package Mason::MyDynHandler;
our @ISA = qw(HTML::Mason::ApacheHandler);
use HTML::Mason::ApacheHandler;
sub handler
{
my($r) = @_;
my $output = '% print STDERR "$m->session\n"; \n alert("foo");';
my $ah = HTML::Mason::ApacheHandler->handler($r);
my $mi = $ah->interp;
my $c = $mi->make_component(comp_source => $output);
my $realOutput = $mi->exec($c);
print $realOutput;
return OK;
}
####
[Thu Feb 9 17:28:39 2012] [error] [Mason] File does not exist: /somepath/foo.dynjs
[Thu Feb 9 17:28:39 2012] [error] Can't call method "interp" without a package or object reference at ../Mason/MyDynHandler.pm line 43.\n