Hi, I am trying to wrap a simple mod_perl handler around a HTML::Mason::ApacheHandler. I am trying to follow the code example on Mason HQ http://www.masonhq.com/docs/manual/Admin.html#writing_a_wrapper here. See Below.
If I try to access or use $m or $r inside the handler sub my error log tells me "Can't call method "request_comp" without a package or object reference at" - at any line I try to use $m or $r. I am assuming that you put your code inside the handler sub, but as the "example" fails to point out is where and how do I actually use this approach. Can anyone who has had success with this approach please point me in the right direction. I want to keep all data access and the conventional controller logic out of .htm or .mas files scattered about the site heirarchey and want to use handlers to keep as much of the app. inside apache as possible. Thanks Sane PS I'm a newbie. package MyApp::Mason; use strict; use HTML::Mason::ApacheHandler; my $ah = HTML::Mason::ApacheHandler->new ( comp_root => '/path/to/comp/root', data_dir => '/path/to/data/dir' ); sub handler { my ($r) = @_; return $ah->handle_request($r); } -- View this message in context: http://www.nabble.com/Custom-mod_perl-content-handler-that-wraps-around-Mason-tf2928977.html#a8188868 Sent from the Perl Mason - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users