From: James E. J. Jr. <mu...@us...> - 2003-08-02 06:16:56
|
Update of /cvsroot/psp/psp/lib/tools/Parser In directory sc8-pr-cvs1:/tmp/cvs-serv27675/psp/lib/tools/Parser Modified Files: Error.pm Log Message: $out is now local() -- no longer lexical -- allows for a lexical $out. treat $out as scalar ref. declare need for $fs lexical within error report context. make sure fieldspace is defined before processing with report. Index: Error.pm =================================================================== RCS file: /cvsroot/psp/psp/lib/tools/Parser/Error.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Error.pm 21 Nov 2002 16:24:21 -0000 1.3 +++ Error.pm 2 Aug 2003 06:16:53 -0000 1.4 @@ -65,7 +65,8 @@ $title = "Errors Were Encountered" unless defined $title; - $this->code('if ($fs->errors_p())'); + $this->context_lexical('$fs'); + $this->code('if ($fs && $fs->errors_p())'); $this->begin_pspblock('if fs->errors_p'); $this->code('my $field_errors = 0;'); @@ -98,8 +99,11 @@ # process the error object here when doing "full". if ($do_full) { + my $page_name = $this->{page_name}; + my $pile_name = $this->{pile_name}; + my $package = $pile_name ? "Pile::".$pile_name : "Page::".$page_name; $this->code('$error_obj->isa("field") and $field_errors++;'); - $this->code('$out->put( $error_obj->as_bullets() );'); + $this->code("\$\${${package}::out}.=( \$error_obj->as_bullets() );"); } } |