Home  |  Linux  | Mysql  | PHP  | XML
From:Robert Hicks Date:Wed May 14 18:25:32 2008
Subject:pushing errors to another sub
just "bad" pseudo code:

sub one {
   $process->name(\$html) || $errors_from_one( $process->error() );

   $process->name(\$text) || $errors_from_one( $process->error() );
}

sub errors_from_one {
     my $error = @_;

     push (my @errors, $error);

     # do stuff to make sure the errors are uniq

     return my @uniq_error_list;
}


I want to be able to get at those errors later. Will something like that 
work?

Robert


Navigate in group perl.beginners at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants