Subject: | [patch] ErrorRunmode should not create a run mode |
In 0.15, the ErrorRunmode attribute automatically installs the method as
a run mode, but this does not match the behavior of CGI::Application's
error_mode(). For example, without using CAP::AutoRunmode:
sub setup { $_[0]->error_mode("e"); }
sub e { print "error mode\n"; }
% test.pl rm=e
No such run mode 'e' at ./test.pl line 9
But using CAP::AutoRunmode 0.15:
use CGI::Application::Plugin::AutoRunmode;
sub e : ErrorRunmode { print "error mode\n"; }
% test.pl rm=e
Content-Type: text/html; charset=ISO-8859-1
error mode
This patch prevents ErrorRunmode from installing the method as a run
mode. After applying this patch:
use CGI::Application::Plugin::AutoRunmode;
sub e : ErrorRunmode { print "error mode\n"; }
% test.pl rm=e
No such run mode 'e' at ./test.pl line 9
Users who really want to install the error method as a run mode should
explicitly include the Runmode attribute:
use CGI::Application::Plugin::AutoRunmode;
sub e : ErrorRunmode Runmode { print "error mode\n"; }
Subject: | patch.error_mode_not_runmode |
Message body not shown because it is not plain text.