attributes->{'Args'} no longer being not defined.
Re: 104
if( ! exists $self->attributes->{Args} ) {
# When 'Args' does not exist, that means we want 'any number of args'.
return undef;
- } elsif(!defined($self->attributes->{Args}[0])) {
+ } elsif(
+ !defined($self->attributes->{Args}[0]) ||
+ $self->attributes->{Args}[0] eq '' ) {
# When its 'Args' that internal cue for 'unlimited'
return undef;
} elsif(
return [] unless scalar(@arg_protos);
return [] unless defined($arg_protos[0]);
+ return [] if ($arg_protos[0] eq '' && scalar(@arg_protos) == 1);
# If there is only one arg and it looks like a number
# we assume its 'classic' and the number is the number of
--- /dev/null
+package TestPath::Controller::Four;
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller' }
+
+sub four :Path('') :Args() {
+ my ( $self, $c ) = @_;
+ $c->response->body( 'OK' );
+}
+
+__PACKAGE__->meta->make_immutable;
\ No newline at end of file
use FindBin;
use lib "$FindBin::Bin/lib";
-use Test::More tests => 9;
+use Test::More tests => 12;
use Catalyst::Test 'TestPath';
ok( $response->is_success, '"Path(\'\')" - Response Successful 2xx' );
is( $response->content, 'OK', '"Path(\'\')" - Body okay' );
}
-
-
+{
+ ok( my $response = request('http://localhost/four'), 'Request' );
+ ok( $response->is_success, '"Path(\'\')" - Response Successful 2xx' );
+ is( $response->content, 'OK', '"Path() Args()" - Body okay' );
+}
\ No newline at end of file