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

People
Owner: Nobody in particular
Requestors: rurban [...] x-ray.at
Cc:
AdminCc:

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

Attachments


Subject: check length of handlers
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
Message-ID: <rt-4.0.13-31553-1374244828-1435.0-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1374244828-31553-2"
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
Content-Length: 314
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
MIME-Version: 1.0
Content-Type: text/x-patch; name="HTML-Mason-1.51-returns.patch"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="HTML-Mason-1.51-returns.patch"
Content-Transfer-Encoding: binary
Content-Length: 992
diff -bu ./blib/lib/HTML/Mason/Interp.pm~ ./blib/lib/HTML/Mason/Interp.pm --- ./blib/lib/HTML/Mason/Interp.pm~ 2013-05-08 20:45:13.000000000 -0500 +++ ./blib/lib/HTML/Mason/Interp.pm 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/Request.pm~ ./blib/lib/HTML/Mason/Request.pm --- ./blib/lib/HTML/Mason/Request.pm~ 2013-05-08 20:45:13.000000000 -0500 +++ ./blib/lib/HTML/Mason/Request.pm 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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.