perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tammy Hepps <the...@sparknotes.com>
Subject Suppressing Embperl warnings?
Date Fri, 03 Jan 2003 18:11:42 GMT
Hi all -

I am running a script from the command line that uses Embedded Perl to 
generate static HTML pages.  I am calling HTML::Embperl::Execute on 
different input files in the following manner:

my $errors = [];
HTML::Embperl::Execute ({ inputfile => ...,
                             outputfile => ...,
                             debug => 0, options => 10769, escmode => 0, 
errors => $errors,
                             param => [{ ... }] });
output_embperl_errors ($errors);

sub output_embperl_errors {
     my ($errors) = @_;
     foreach my $error (@$errors) {
         print STDERR $error unless $error =~ /subroutine .* redefined/i;
     }
}

My problem is that many warnings about redefined subroutines (which I don't 
care about) get outputted to my terminal window, obscuring the legitimate 
warning and error messages.  These messages look like:

[26180]ERR:  32:  Warning in Perl code: Subroutine page_header redefined at 
/home/www/embperl/template.eplo line 1.

As you can see in the code above, I tried shuttling these warnings to the 
errors arrayref and outputting them selectively via 
output_embperl_errors().  The arrayref ultimately does contain the 
warnings, but the warnings are still outputted as they are generated!

I've tried a number of other schemes to suppress these warnings to no 
avail, so I would appreciate your help!

Thanks -

Tammy


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message