| Please
ignore my previous email. I had replied to the wrong
thread.....
==================================================
I use
this set of subroutines to display any p4perl warnings or errors. Just call
command Status() immediately after any important p4perl calls. Warnings will
warn and errors will exit.
#------------------------------------------------ # Error handling
subroutines #------------------------------------------------ sub
commandStatus {
if (
$p4->WarningCount() ) {
displayWarnings();
}
if (
$p4->ErrorCount() ) {
displayErrors(); exit;
} }
sub displayWarnings
{ my $warnings = $p4->Warnings();
foreach $warning (
{$warnings} )
{ print "\nWarnings:
$warning\n\n"; }
return
$warnings; }
sub displayErrors
{ my $errors = $p4->Errors();
foreach $error (
{$errors} )
{ print "\nError:
$error\n\n"; }
return
$errors; }
Later.....Scott...
Thanks very much..
Tony Smith
<tony smee.org> wrote:
On
Wednesday 02 August 2006 06:21, mehta suman wrote: > that worked in
perl.. but when I go to command line and run following >
command > > p4 client SumanWin > > then it still
shows me the old root path. Not the updated one. > what could be the
possible reason?
I don't know, but you should check the contents of
the $p4->Errors() array after calling SaveClient() to see if it's
failing. Also, the example you gave was missing a '->' so maybe
that's the reason.
$client =
$p4->FetchClient("SumanWin"); $client->{'Root'} =
"c:\\work12"; $p4->SaveClient($client);
foreach my $e (
$p4->Errors() ) { printf( "ERROR: %s\n", $e
); }
Tony
Want to be your own boss? Learn how on Yahoo!
Small Business. |