Date: | Mon, 21 Nov 2005 17:04:44 -0500 |
From: | jesse <jesse [...] fsck.com> |
To: | bug-html-mason [...] rt.cpan.org |
Subject: | infinite loop in plugins |
I'm sorry that the test case isn't in the form of a mason test script,
but hopefull this is illustrative of the issue.
Jesse
#!/usr/bin/perl
use warnings;
use strict;
my $server = MyApp::Server->new( 8081);
$server->run;
package MyApp::Server;
use base qw/HTTP::Server::Simple::Mason/;
sub mason_config {
return ( comp_root => '/tmp/mason-pages',
plugins => ['PluginDemo']);
}
sub handle_error {
my $self = shift;
my $err = shift;
die $@;
}
package PluginDemo;
use base qw/HTML::Mason::Plugin/;
use Carp;
sub start_request_hook {
my ( $self, $context ) = @_;
my $m = $context->request;
unless ( $m->is_subrequest() ) {
# can't get a base_comp in a plugin yet
warn "my base comp is ".$m->base_comp;
}
}
1;
--