# This file documents the revision history for Perl extension Catalyst.
Bug fixed:
- - uri_for will now escape unsafe chars in captures and encode utf8 chars
+ - DispatchType::Index's uri_for_action only returns for actions registered
+ with it (prevents 'index :Path' or similar resolving to the wrong URI)
+
+5.80021 2010-03-03 23:02:01
+
+ Bug fixed:
+ - $c->uri_for will now escape unsafe characterss in captures
+ ($c->request->captures) and correctly encode utf8 charracters.
5.80020 2010-02-04 06:51:18
use strict;
use warnings;
use inc::Module::Install 0.91;
-{ # Ensure that these get used - yes, M::I loads them for us, but if you're
- # in author mode and don't have them installed, then the error is tres
- # cryptic.
- no warnings 'redefine';
- use Module::Install::AuthorRequires;
- use Module::Install::CheckConflicts;
- use Module::Install::AuthorTests;
-}
+# Ensure that these get used - yes, M::I loads them for us, but if you're
+# in author mode and don't have them installed, then the error is tres
+# cryptic.
+use Module::Install::AuthorRequires;
+use Module::Install::CheckConflicts;
+use Module::Install::AuthorTests;
perl_version '5.008004';
# Remember to update this in Catalyst::Runtime as well!
-our $VERSION = '5.80020';
+our $VERSION = '5.80021';
our $PRETTY_VERSION = $VERSION;
$VERSION = eval $VERSION;
sub register {
my ( $self, $c, $action ) = @_;
- $self->_actions->{ $action->reverse } = $action;
+ $self->_actions->{ $action->reverse } = $action if $action->name eq 'index';
return 1;
}
return undef if @$captures;
- return undef unless $action->name eq 'index';
+ return undef unless exists $self->_actions->{ $action->reverse };
return "/".$action->namespace;
}
=head3 Standalone server mode
FastCgiExternalServer /tmp/myapp.fcgi -socket /tmp/myapp.socket
- Alias /myapp/ /tmp/myapp/myapp.fcgi/
+ Alias /myapp/ /tmp/myapp.fcgi/
# Or, run at the root
Alias / /tmp/myapp.fcgi/
# Remember to update this in Catalyst as well!
-our $VERSION='5.80020';
+our $VERSION='5.80021';
$VERSION = eval $VERSION;
);
}
+{
+ my $index_not_private = $dispatcher->get_action_by_path(
+ '/action/chained/argsorder/index'
+ );
+
+ is(
+ Catalyst::uri_for( $context, $index_not_private )->as_string,
+ 'http://127.0.0.1/argsorder',
+ 'Return non-DispatchType::Index path for index action with args'
+ );
+}
done_testing;
'/class_forward_test_method'
);
+warn $dispatcher->uri_for_action($private_action);
+
ok(!defined($dispatcher->uri_for_action($private_action)),
"Private action returns undef for URI");