Skip Menu |

This queue is for tickets about the Catalyst-Runtime CPAN distribution.

Report information
The Basics
Id: 35994
Status: resolved
Priority: 0/
Queue: Catalyst-Runtime

People
Owner: Nobody in particular
Requestors: janus [...] errornet.de
Cc:
AdminCc:

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



Subject: Patch to prevent warnings in Dispatcher.pm
Since revision 7714 <http://dev.catalystframework.org/svnweb/Catalyst/revision?rev=7714>, Catalyst::Runtime::Dispatcher is missing a simple check in line 287 and thus throws warnings with every request: Use of uninitialized value in length at /usr/local/libdata/perl5/site_perl/Catalyst/Dispatcher.pm line 287. The attached patch should be self-explanatory. Regards, Simon
Subject: Catalyst-Runtime-Dispatcher.diff
Index: Dispatcher.pm =================================================================== --- Dispatcher.pm (revision 7762) +++ Dispatcher.pm (working copy) @@ -285,7 +285,7 @@ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg for grep { defined } @{$c->req->captures||[]}; $c->log->debug( 'Path is "' . $c->req->match . '"' ) - if ( $c->debug && length $c->req->match ); + if ( $c->debug && $c->req->match && length $c->req->match ); $c->log->debug( 'Arguments are "' . join( '/', @args ) . '"' ) if ( $c->debug && @args );
From: janus [...] errornet.de
On Mon May 19 02:59:03 2008, janus wrote: [snip] Show quoted text
> The attached patch should be self-explanatory. >
... well, except it should probably be "defined $c->req->match". Simon
On Mon May 19 09:35:15 2008, janus wrote: Show quoted text
> On Mon May 19 02:59:03 2008, janus wrote: > [snip]
> > The attached patch should be self-explanatory. > >
> > ... well, except it should probably be "defined $c->req->match".
Although we believe your patch to be correct, we're trying to be a little more strict on the (code) patches we apply in that we would like them to have accompanying tests. If you can provide a test case that shows this failure, we will apply your patch without hesitation.
From: janus [...] errornet.de
On Fri May 23 08:59:05 2008, BRICAS wrote: Show quoted text
> On Mon May 19 09:35:15 2008, janus wrote:
> > On Mon May 19 02:59:03 2008, janus wrote: > > [snip]
> > > The attached patch should be self-explanatory. > > >
> > > > ... well, except it should probably be "defined $c->req->match".
> > Although we believe your patch to be correct, we're trying to be a > little more strict on the (code) patches we apply in that we would like > them to have accompanying tests. > > If you can provide a test case that shows this failure, we will apply > your patch without hesitation.
I'll try to do that in the future. But for now this bug has disappeared in 5.7014 - probably intended, i guess.
This must have been related to the "Path" regression fixed in 5.7014. This ticked is now closed.