X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=a994166ef81e2181540ccd03c56a5f6f9ecfd31f;hp=bab0bd4661867113a067d581fd21da96d2d948f5;hb=c49128b19ce9fa7afa95ccf9e95da00f74569ab5;hpb=123c73194d1d4e630b17f211b1fbfd2edeff190b diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index bab0bd4..a994166 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1,10 +1,11 @@ package Catalyst; use Moose; +use Moose::Meta::Class (); 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; @@ -1099,16 +1100,16 @@ 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, " + warn "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)); + }; $class->setup_finalize; } @@ -1188,7 +1189,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 +1223,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); @@ -2174,7 +2175,7 @@ sub setup_components { sub _controller_init_base_classes { my ($app_class, $component) = @_; foreach my $class ( reverse @{ mro::get_linear_isa($component) } ) { - Moose->init_meta( for_class => $class ) + Moose::Meta::Class->initialize( $class ) unless find_meta($class); } } @@ -2748,6 +2749,8 @@ phaylon: Robert Sedlacek rafl: Florian Ragwitz +random: Roland Lammel + sky: Arthur Bergman the_jester: Jesse Sheidlower