__PACKAGE__->request_class('Catalyst::Request');
__PACKAGE__->response_class('Catalyst::Response');
-our $VERSION = '5.65';
+our $VERSION = '5.66';
sub import {
my ( $class, @arguments ) = @_;
sub plugin {
my ( $class, $name, $plugin, @args ) = @_;
- $class->_register_plugin($plugin, 1);
+ $class->_register_plugin( $plugin, 1 );
eval { $plugin->import };
$class->mk_classdata($name);
Merges path with C<$c-E<gt>request-E<gt>base> for absolute uri's and
with C<$c-E<gt>namespace> for relative uri's, then returns a
normalized L<URI> 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
$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 ) : '' );
{
my %PLUGINS;
- sub registered_plugins {
+
+ sub registered_plugins {
my $proto = shift;
return sort keys %PLUGINS unless @_;
my $plugin = shift;
message => qq/Couldn't load ${type}plugin "$plugin", $error/ );
}
- $PLUGINS{$plugin} = 1;
+ $PLUGINS{$plugin} = 1;
unless ($instant) {
no strict 'refs';
unshift @{"$class\::ISA"}, $plugin;