Skip Menu |

This queue is for tickets about the HTML-Mason CPAN distribution.

Report information
The Basics
Id: 87050
Status: new
Priority: 0/
Queue: HTML-Mason

Owner: Nobody in particular
Requestors: rurban [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)


Subject: check length of handlers
Download (untitled) / with headers
text/plain 314b
use_dhandlers and use_autohandlers fall into the return precedence trap [perl #59802]. i.e. return defined $self->{autohandler_name} and length $self->{autohandler_name}; never checks the length as it parses to (return defined $self->{autohandler_name}) and length $self->{autohandler_name}; See attached patch
Subject: HTML-Mason-1.51-returns.patch
diff -bu ./blib/lib/HTML/Mason/ ./blib/lib/HTML/Mason/ --- ./blib/lib/HTML/Mason/ 2013-05-08 20:45:13.000000000 -0500 +++ ./blib/lib/HTML/Mason/ 2013-07-19 09:36:54.167807984 -0500 @@ -865,7 +865,7 @@ sub use_autohandlers { my $self = shift; - return defined $self->{autohandler_name} and length $self->{autohandler_name}; + return (defined $self->{autohandler_name} and length $self->{autohandler_name}); } # Generate HTML that describes Interp's current status. diff -bu ./blib/lib/HTML/Mason/ ./blib/lib/HTML/Mason/ --- ./blib/lib/HTML/Mason/ 2013-05-08 20:45:13.000000000 -0500 +++ ./blib/lib/HTML/Mason/ 2013-07-19 09:36:05.008259380 -0500 @@ -346,7 +346,7 @@ sub use_dhandlers { my $self = shift; - return defined $self->{dhandler_name} and length $self->{dhandler_name}; + return (defined $self->{dhandler_name} and length $self->{dhandler_name}); } sub alter_superclass

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to