Hi All,

Kind of stumped trying to get a subclass of HTML::Mason::Request working with 
Mason 1.42.

The error is:

[Fri Jul 15 07:24:09 2011] [error] [client 172.16.189.1] The following 
parameter was passed in the call to MyApp::Mason::Request->new() but was not 
listed in the validation options: ah\n\nStack:\n  
[/usr/share/perl5/HTML/Mason/ApacheHandler.pm:882]\n  
[/usr/share/perl5/HTML/Mason/ApacheHandler.pm:822]\n  
[/var/www/perl/MyApp/Mason.pm:41]\n  [-e:0]\n, referer: http://fusion/index.html

It seems that 'ah' is being passed in as an argument to the constructor of the 
new class (MyApp::Mason::Request) but it is not being recognised by the 
superclass.

The new class (MyApp::Mason::Request) is very tiny / simple - at the moment the 
only method that exists is 'new':

sub new {
   
    my $class = shift;

    $class->alter_superclass(
        $HTML::Mason::ApacheHandler::VERSION ?
        'HTML::Mason::Request::ApacheHandler' :
        $HTML::Mason::CGIHandler::VERSION ?
        'HTML::Mason::Request::CGI' :
        'HTML::Mason::Request' );

    my $self = $class->SUPER::new( @_ );

    return( $self );
}

httpd configuration is with a package:

<LocationMatch ".*(\.html|\.pl|\.xml|\/)$">
        DefaultType     text/html
        SetHandler      perl-script
        PerlHandler     MyApp::Mason
</LocationMatch>

And in the package MyApp::Mason there is

my $apacheHandler = new HTML::Mason::ApacheHandler(
    request_class => 'MyApp::Mason::Request',

Everything kind of looks ok.

Any help appreciated.

  -greg

--




--
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to