doh! I forgot:
$p4->SetPassword(...);
On Oct 15, 2007, at 11:44 AM, Garrett Goebel wrote:
> I started with P4Perl in the context of vsstop4. I've
found the
> style of vsstop4 to be understandably dated. In the
interest of
> understanding this wheel, I've been taking it apart and
rewriting
> it. What I'm currently after is to see if a depot
exists,
> obliterate everything in it, drop it, and recreate it.
Which would
> be a useful thing to be able to do as I add
functionality to my
> rewrite of vsstop4 and wish to re-run the conversion of
a small vss
> test repository.
>
> Below is a script which attempts to list the depots. It
is running
> with P4 version 3.5708 on ActiveState Perl 5.6.1 (build
638). The
> output follows. I can't see how the error message given
can be
> correct.
>
> Any help or insight would be appreciated. Is it
possible to list,
> drop and add a depot using P4Perl? If so, how?
>
> thanks,
>
> Garrett
>
>
> #!perl -s -w
> use strict;
> use warnings;
> use Carp;
> use lib '.';
> use convert;
> use P4;
> my ($p4, p4err, $result);
> $p4 = P4->new();
>
> $p4->SetApiLevel(61);
> $p4->SetProg('vss2p4');
> $p4->SetPort($convert::p4port);
> $p4->SetClient($convert::p4client);
> $p4->SetUser($convert::p4user);
> $p4->Tagged();
> $p4->Connect() or croak "Unable to connect to
p4 $convert::p4port:
> $!n";
> $p4->DebugLevel(0);
>
> print "[Depots]n";
> $p4->Depots;
> if ($p4->ErrorCount) { print for $p4->Errors; }
> print "n";
>
> print "[Info]n";
> $result = $p4->Info;
> print "$_ => $result->{$_}n" for keys
%$result;
> print "n";
>
> 1;
>
> __END__
>
> >c:workvsstop4>example1.pl
> [Depots]
> Your session has expired, please login again.
>
> [Info]
> serverVersion => P4D/NTX86/2007.2/122958
(2007/05/22)
> clientHost => LAP000533
> password => enabled
> serverRoot => C:Program FilesPerforce
> clientRoot => C:/work/vsstop4/data
> clientAddress => 127.0.0.1:1404
> clientName => vss
> userName => SOFTDEV
> serverDate => 2007/10/15 15:25:41 +0000 CST
> serverLicense => none
> serverAddress => localhost:1666
_______________________________________________
p4perl mailing list
p4perl perforce.com
http://maillist.perforce.com/mailman/listinfo/p4perl
|