X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=981b20fb339ea4c68f0ae81f5e360af0add7159b;hp=a0c4d4068ee5f88413d7b19760d34ff33c0db7e1;hb=97b58e1798479e2df8d050e72e87453f6ad81668;hpb=836e1134dfc70e064464c366a44ebb6aabfa1648 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index a0c4d40..981b20f 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -58,7 +58,7 @@ __PACKAGE__->engine_class('Catalyst::Engine::CGI'); __PACKAGE__->request_class('Catalyst::Request'); __PACKAGE__->response_class('Catalyst::Response'); -our $VERSION = '5.64'; +our $VERSION = '5.66'; sub import { my ( $class, @arguments ) = @_; @@ -542,7 +542,7 @@ loads and instantiates the given class. sub plugin { my ( $class, $name, $plugin, @args ) = @_; - $class->_register_plugin($plugin, 1); + $class->_register_plugin( $plugin, 1 ); eval { $plugin->import }; $class->mk_classdata($name); @@ -701,7 +701,9 @@ EOF Merges path with C<$c-Erequest-Ebase> for absolute uri's and with C<$c-Enamespace> for relative uri's, then returns a normalized L object. If any args are passed, they are added at the -end of the path. +end of the path. If the last argument to uri_for is a hash reference, +it is assumed to contain GET parameter key/value pairs, which will be +appended to the URI in standard fashion. =cut @@ -720,7 +722,8 @@ sub uri_for { $namespace = '' if $path =~ /^\//; $path =~ s/^\///; - my $params = (scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {}); + my $params = + ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} ); # join args with '/', or a blank string my $args = ( scalar @args ? '/' . join( '/', @args ) : '' ); @@ -1861,7 +1864,8 @@ the plugin name does not begin with C. { my %PLUGINS; - sub registered_plugins { + + sub registered_plugins { my $proto = shift; return sort keys %PLUGINS unless @_; my $plugin = shift; @@ -1881,7 +1885,7 @@ the plugin name does not begin with C. message => qq/Couldn't load ${type}plugin "$plugin", $error/ ); } - $PLUGINS{$plugin} = 1; + $PLUGINS{$plugin} = 1; unless ($instant) { no strict 'refs'; unshift @{"$class\::ISA"}, $plugin;