[p4perl] Problems with Perl/Perforce Integration
Weintraub, David
david.weintraub at bofasecurities.com
Wed Jan 4 09:09:59 PST 2006
I've played around with the Perforce/Perl integration, and did the
following:
use P4;
#
########################################################################
########################################################################
# PERL PRAGMAS
#
use strict;
use warnings;
#
########################################################################
########################################################################
# QUICK AND DIRTY TEST
#
my $p4 = new P4;
$p4->DebugLevel(5);
$p4->ParseForms();
$p4->SetClient("nbk6n2b-main-default");
$p4->SetPort("scsefpsdcs01:1666");
if (not $p4->Connect()) {
die "Cannot connect to Perforce Server\n";
}
my $clientRef = $p4->ParseSpec("client", "nbk6n2b-main-default");
if($p4->ErrorCount()) {
print "ERROR: Found @{[$p4->ErrorCount()]} in command!\n";
foreach my $error ($p4->Errors()) {
print qq(Error = "$error"\n);
}
}
foreach my $field (sort keys(%{$clientRef})) {
print qq("$field" = "$clientRef->{$field}"\n);
}
I get the following output:
C:\Documents and Settings\nbk6n2b\Desktop>foo.pl
[ParseSpec]: Parsing a client spec. Form is:
nbk6n2b-main-default
[P4Result::Reset]: Discarding previous results
[PerlClientUser::OutputStat]: Received tagged output
[PerlClientUser::OutputStat]: Parsing form
[PerlClientUser::DictToHash]: Converting dictionary to
[PerlClientUser::InsertItem]: key Client, value nbk6n2b
base=Client, index=
Creating new scalar hash member Client
[PerlClientUser::InsertItem]: key Update, value 2005/12
base=Update, index=
Creating new scalar hash member Update
[PerlClientUser::InsertItem]: key Access, value 2006/01
base=Access, index=
Creating new scalar hash member Access
[PerlClientUser::InsertItem]: key Owner, value nbk6n2b
base=Owner, index=
Creating new scalar hash member Owner
[PerlClientUser::InsertItem]: key Host, value scsefpsdc
base=Host, index=
Creating new scalar hash member Host
[PerlClientUser::InsertItem]: key Description, value Cr
base=Description, index=
Creating new scalar hash member Description
[PerlClientUser::InsertItem]: key Root, value /home/nbk
base=Root, index=
Creating new scalar hash member Root
[PerlClientUser::InsertItem]: key Options, value noallw
unlocked nomodtime rmdir
base=Options, index=
Creating new scalar hash member Options
[PerlClientUser::InsertItem]: key LineEnd, value local
base=LineEnd, index=
Creating new scalar hash member LineEnd
[PerlClientUser::InsertItem]: key View0, value //depot/
ain-unix/...
base=View, index=0
Creating new array hash member View
Finding correct index level...
Inserting value //depot/main/unix/... //nbk6n2b
[P4Result::AddOutput]: (perl object)
[PerlClientUser:HandleError]: Received error
[P4Result::AddError]: Error detected at line 1.
Syntax error in 'nbk6n2b-main-default'.
ERROR: Found 1 in command!
Error = "Error detected at line 1.
Syntax error in 'nbk6n2b-main-default'.
"
I get the same "Syntax error in <ClientName>" no matter which client I
use. I am on a Windows XP system using the latest Perl integration from
the Perforce website. I am also using ActiveState Perl 5.8.7.
Any ideas?
--
David Weintraub
eval "s//" . sprintf ("%x%x%x\n", 7912476, 9676484, 1201069) . "/";
tr/123456789abcd/acehklNoPrt !/;
print;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://maillist.perforce.com/pipermail/p4perl/attachments/20060104/1cf1bca1/attachment.html
More information about the p4perl
mailing list