6 messages in com.perforce.perforce-user[p4] p4 perl usage question
FromSent OnAttachments
Singh, Avichal16 Mar 2004 11:43 
Robert Cowham16 Mar 2004 12:45 
Tetlow, Gordon16 Mar 2004 13:55 
Singh, Avichal16 Mar 2004 14:00 
Robert Cowham16 Mar 2004 14:12 
Tetlow, Gordon16 Mar 2004 14:15 
Subject:[p4] p4 perl usage question
From:Singh, Avichal (avic@wamu.net)
Date:03/16/2004 11:43:07 AM
List:com.perforce.perforce-user

Hi

I have worked on perl quite a bit, but new to P4 & P4perl. Trying to execute a "p4 user -i" command, how do I do this the right way using P4perl.

Here is my script:-

10 my $p4 = new P4; 11 ..... 12 $p4->Init(); 13 14 $uinfo= <<EOS; 15 User: $uid 16 FullName: $uname 17 Email: $uemail 18 Password: password 19 EOS 18 19 $p4->SaveUser($uinfo,"-f");

It fails at step 19 stating that Invalid data returned from InputData() method at C:/Perl/site/lib/P4.pm line 211

I also tried passing a reference to a Hash, but then it says:- Can't convert hashref into a form. No spec supplied at C:/Perl/site/lib/P4.pm line 211, <IN> line 2.

Can someone help, ofcourse I can take the easy way out and use "p4 user -i < input.txt", but I wanted to figure out the P4Perl thing.

Thanks in advance Avichal Singh