[p4perl] Help for a beginner
Craig Leigh
cleigh@blackboard.com
Tue, 21 Dec 2004 11:30:52 -0500
I have received the same error:
/*
P4::Client::Run() - Client has not been initialised at
C:/Perl/site/lib/P4.pm line 211.
Failed to connect to Perforce Server at C:\src\p4samp.pl line 7.
*/
but I'm working on it. My $VERSION in p4.pm is: $VERSION = qq( 1.2587
);
I also have:
ActiveState Perl: This is perl, v5.6.1 built for
MSWin32-x86-multi-thread
Perforce client: 2004.2 72642
P4Perl: p4perl56-setup-2.2596.exe
Windows XP Professional w/SP2
Do I have the wrong P4?
--Craig
CM Team
Lead Engineer
x2554
-----Original Message-----
From: p4perl-admin@perforce.com [mailto:p4perl-admin@perforce.com] On
Behalf Of John Hughes
Sent: Tuesday, December 21, 2004 3:31 AM
To: p4perl@perforce.com
Subject: [p4perl] Help for a beginner
Hello,
I am keen to try and code some scripts which will automate a number of
little tasks for us. As I already have perl 5.6, I simply downloaded
P4perl and attempted to use the "Synopsis" code to get me started:
P4::Client::Run() - Client has not been initialised at
:/Perl/site/lib/P4.pm line 223.
Failed to connect to Perforce Server at p4perl.pl line 11.
I am clearly missing something ... Here is my code:
use P4;
my $p4 = new P4;
$user = "<<myP4Username>>";
$clientname = "<<myP4ClientSpecName>>";
$p4port = "<<myP4serverHost:port>>";
$p4->SetUser ( $user );
$p4->SetClient( $clientname );
$p4->SetPort ( $p4port );
#$p4->SetPassword( $p4password );
$p4->Connect() or die( "Failed to connect to Perforce Server" );
my $info = $p4->Run( "info" );
#$p4->Edit( "file.txt" ) or die( "Failed to edit file.txt" );
$p4->Disconnect();
I am working on Windows XP.
Regards
John Hughes
_______________________________________________
p4perl mailing list
p4perl@perforce.com
http://maillist.perforce.com/mailman/listinfo/p4perl
This e-mail is intended only for the personal and confidential use of the recipient(s) named above.
It may include Blackboard confidential and proprietary information, and is not for redistribution.