X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=6aa73577c3a15eaa58aa9c20e4864a24f1a646b7;hb=4e68badce837f4ebc4567faeaa707bbae88c5ffd;hp=005df7a3f8703784c9e4345ce4be345ea957a479;hpb=833b385e3d6454bd249acf859869bf1792109b82;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 005df7a..6aa7357 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -925,9 +925,9 @@ loads and instantiates the given class. MyApp->plugin( 'prototype', 'HTML::Prototype' ); $c->prototype->define_javascript_functions; - + B This method of adding plugins is deprecated. The ability -to add plugins like this B in a Catalyst 5.9. +to add plugins like this B in a Catalyst 5.81. Please do not use this functionality in new code. =cut @@ -935,9 +935,9 @@ Please do not use this functionality in new code. sub plugin { my ( $class, $name, $plugin, @args ) = @_; - # See block comment in t/unit_core_plugin.t + # See block comment in t/unit_core_plugin.t $class->log->warn(qq/Adding plugin using the ->plugin method is deprecated, and will be removed in Catalyst 5.81/); - + $class->_register_plugin( $plugin, 1 ); eval { $plugin->import }; @@ -1250,6 +1250,9 @@ sub uri_for_action { my $action = blessed($path) ? $path : $c->dispatcher->get_action_by_path($path); + unless (defined $action) { + croak "Can't find action for path '$path'"; + } return $c->uri_for( $action, @args ); }