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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to