X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=edd217eb54998e90b6a5e5fea2172bba5bb4a3df;hb=6ab73369947422004890abb05035c491b086283f;hp=28a2baa7905b8d8223d8ff810edc557af066c6d0;hpb=f67b3521e00198a4a530644c7498dbbb6ae9dbbf;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 28a2baa..edd217e 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -75,7 +75,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.80002'; +our $VERSION = '5.80003'; { my $dev_version = $VERSION =~ /_\d{2}$/; @@ -1101,6 +1101,12 @@ EOF # applying modifiers). Scope::Upper::reap(sub { my $meta = Class::MOP::get_metaclass_by_name($class); + if ( $meta->is_immutable && ! { $meta->immutable_options }->{inline_constructor} ) { + die "You made your application class ($class) immutable, " + . "but did not inline the constructor.\n" + . "This will break catalyst, please pass " + . "(replace_constructor => 1) when making your class immutable.\n"; + } $meta->make_immutable(replace_constructor => 1) unless $meta->is_immutable; }, Scope::Upper::SCOPE(1)); @@ -1182,7 +1188,7 @@ sub uri_for { ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} ); carp "uri_for called with undef argument" if grep { ! defined $_ } @args; - s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args; + s/([^A-Za-z0-9\-_.!~*'()])/$URI::Escape::escapes{$1}/go for @args; unshift(@args, $path); @@ -1216,7 +1222,7 @@ sub uri_for { $_ = "$_"; utf8::encode( $_ ) if utf8::is_utf8($_); # using the URI::Escape pattern here so utf8 chars survive - s/([^A-Za-z0-9\-_.!~*'() ])/$URI::Escape::escapes{$1}/go; + s/([^A-Za-z0-9\-_.!~*'()])/$URI::Escape::escapes{$1}/go; s/ /+/g; "${key}=$_"; } ( ref $val eq 'ARRAY' ? @$val : $val )); } @keys);