Subject: | ar method should be in Apache::MVC |
Maypole.pm defines the 'ar' accessor, which is populated with an Apache request object in Apache::MVC::get_request(). The corresponding request object under CGI is available via the 'cgi' method in CGI::Maypole. In this case, no 'cgi' accessor is explicitly defined, but it seems to become available magically when $reguest->{cgi} is populated with the CGI object in CGI::Maypole::get_request().
get_request() might have been better named load_request(), and then get_request() could have been a portable accessor to the underlying CGI or Apache request object.
Anyway, this led to a trivial bug in MP::Plugin::FormBuilder, which had
my $get_request = $r->can( 'ar' ) $r->can( 'cgi' ) || || die "no method for getting request";
This is fixed by swapping the order of the tests, but it might be useful to remove the 'ar' accessor from Maypole.pm.
d.