On Mon, Jun 23, 2014 at 06:21:37PM +0000, Mark Hedges wrote:
> Perl 5.20.0, Apache 2.2.27, APR 1.5.1, APR-util 1.5.3, mod_perl trunk.
>
> 2014-06-23 11:16:32 Mon $ svn diff t/lib/Apache2/TestReload.pm
> Index: t/lib/Apache2/TestReload.pm
> ===================================================================
> --- t/lib/Apache2/TestReload.pm (revision 1604706)
> +++ t/lib/Apache2/TestReload.pm (working copy)
> @@ -15,7 +15,8 @@
> sub handler {
> my $r = shift;
> $pass++;
> - if ($r->args eq 'last') {
> + my $args = $r->args;
> + if (defined $args && $r->args eq 'last') {
> Apache2::Reload->unregister_module($package);
> ModPerl::Util::unload_package($package);
> $pass = 0;
Why not just
my $args = $r->args;
if (defined $args and $args eq 'last') {
I guess repeat calls to $r->args have virtually no cost?