X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=62fc85b701fbe72d418969ca903052abeeb5d377;hb=acca8cd512f838b4f863486de70d514ac0fae4bf;hp=67caa15a4453f5072a1a4eada1c22800767c0542;hpb=6e5505d4891660b3ec52547ca1915bb84f23af57;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 67caa15..62fc85b 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -4,7 +4,7 @@ use Moose; extends 'Catalyst::Component'; use Moose::Util qw/find_meta/; use bytes; -use Scope::Upper (); +use B::Hooks::EndOfScope (); use Catalyst::Exception; use Catalyst::Log; use Catalyst::Request; @@ -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}$/; @@ -1099,7 +1099,7 @@ EOF # Note however that we have to do the work on scope end, so that method # modifiers work correctly in MyApp (as you have to call setup _before_ # applying modifiers). - Scope::Upper::reap(sub { + B::Hooks::EndOfScope::on_scope_end { 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, " @@ -1108,7 +1108,7 @@ EOF . "(replace_constructor => 1) when making your class immutable.\n"; } $meta->make_immutable(replace_constructor => 1) unless $meta->is_immutable; - }, Scope::Upper::SCOPE(1)); + }; $class->setup_finalize; } @@ -1188,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); @@ -1222,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);