Hi Jonathan, Testing the constructor of my new class the value being passed to the "alter_superclass" method is 'HTML::Mason::Request::ApacheHandler'.
So the answer to the question seems like yes. Ideas? -greg On Jul 18, 2011, at 3:13 PM, Jonathan Swartz wrote: > Are you subclassing HTML::Mason::Request::ApacheHandler, defined around line > 47 of HTML::Mason::ApacheHandler? > > On Jul 16, 2011, at 4:43 AM, Greg Wickham wrote: > >> >> 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 > ------------------------------------------------------------------------------ 10 Tips for Better Web Security Learn 10 ways to better secure your business today. Topics covered include: Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, security Microsoft Exchange, secure Instant Messaging, and much more. http://www.accelacomm.com/jaw/sfnl/114/51426210/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users