[Catalyst-commits] r6177 - in trunk/Catalyst-Runtime: . lib
marcus at dev.catalyst.perl.org
marcus at dev.catalyst.perl.org
Sun Mar 18 19:26:43 GMT 2007
Author: marcus
Date: 2007-03-18 19:26:42 +0000 (Sun, 18 Mar 2007)
New Revision: 6177
Modified:
trunk/Catalyst-Runtime/Changes
trunk/Catalyst-Runtime/lib/Catalyst.pm
Log:
Warning in uri_for
Modified: trunk/Catalyst-Runtime/Changes
===================================================================
--- trunk/Catalyst-Runtime/Changes 2007-03-15 16:32:08 UTC (rev 6176)
+++ trunk/Catalyst-Runtime/Changes 2007-03-18 19:26:42 UTC (rev 6177)
@@ -1,5 +1,7 @@
This file documents the revision history for Perl extension Catalyst.
+ - Add warning in uri_for
+
5.7007 2006-03-13 14:18:00
- Performance and stability improvements to the built-in HTTP server.
- Don't ignore file uploads if form contains a text field with the
Modified: trunk/Catalyst-Runtime/lib/Catalyst.pm
===================================================================
--- trunk/Catalyst-Runtime/lib/Catalyst.pm 2007-03-15 16:32:08 UTC (rev 6176)
+++ trunk/Catalyst-Runtime/lib/Catalyst.pm 2007-03-18 19:26:42 UTC (rev 6177)
@@ -24,7 +24,7 @@
use Tree::Simple::Visitor::FindByUID;
use attributes;
use utf8;
-use Carp qw/croak/;
+use Carp qw/croak carp/;
BEGIN { require 5.008001; }
@@ -949,7 +949,13 @@
};
# join args with '/', or a blank string
- my $args = ( scalar @args ? '/' . join( '/', map {s/\?/%3F/g; $_} @args ) : '' );
+ my $args = ( scalar @args ? '/' . join( '/', map {
+ unless (defined) {
+ carp "uri_for called with undefined argument";
+ $_='';
+ }
+ s/\?/%3F/g; $_
+ } @args ) : '' );
$args =~ s/^\/// unless $path;
my $res =
URI->new_abs( URI->new_abs( "$path$args", "$basepath$namespace" ), $base )
More information about the Catalyst-commits
mailing list