Subject: | Pod code doesn't work for cgiapp_postrun in 5.8 linux |
Thank you for working on this great module. I found the sample code for cgiapp_postrun does not work in perl 5.8 (redhat linux 9, autobuilt by cpan). Below is the code sampel from the pod and a fix. Best wishes from Matt Rosin (mattr at telebody.com), Tokyo, Japan
sub cgiapp_postrun {
# output filters and wrapping templates here
my $self = shift; # app instance
my $output_ref = shift;
# Enclose output HTML table
my $new_output = "<table border=1>";
$new_output .= "<tr><td> Hello, World! </td></tr>";
$new_output .= "<tr><td>". $$output_ref ."</td></tr>";
$new_output .= "</table>";
# Replace old output with new output
# $output_ref = \$new_output; ## DOESN'T WORK IN 5.8 (FROM POD)
$$output_ref = $new_output; ## WORKS IN 5.8
}