%# -*- mode: html-helper; mmm-classes: mason; -*-
This simple Mason page examines the mod_perl 2 $r object passed to every Mason page. The first object shown is the actual $r passed. In mod_perl 2 there are two 'request objects':
The workhorse request object with most of the useful methods attached. The Apache::Cookie new and fetch methods take this object as a parameter in libapreq2. As of MasonX::Apache2Handler-0.05 this object is passed as $r. The change was made to conform to the request object received by standard mod_perl 2 handlers.
The other request object with a limited number of methods attached. Prior to MasonX::Apache2Handler-0.05 this object was passed as $r.
Please refer to the mod perl 2 documentation for further information.
<%perl> my $disp = '$r'; my $name = sprintf( "%s", $r ); $name =~ s/=.*//; my @methods = $m->comp( '.probe_methods', $name ); $m->comp( '.display', $disp, $name, @methods ); my $rr; if( $name eq 'Apache::RequestRec' ) { $disp = 'Apache::Request->new( $r );'; $rr = Apache::Request->new( $r ); } else { $disp = 'Apache->request;'; $rr = Apache->request; } $name = sprintf( "%s", $rr ); $name =~ s/=.*//; @methods = $m->comp( '.probe_methods', $name ); $m->comp( '.display', $disp, $name, @methods ); %perl>is a <% $name %>.
The following methods are in this interface:
<% $methods[$row+$col*@methods/6] %> | % }