requires 'HTML::Entities';
requires 'HTTP::Body' => '1.04'; # makes uploadtmp work
requires 'HTTP::Headers' => '1.64';
- requires 'HTTP::Request';
- requires 'HTTP::Response';
+ requires 'HTTP::Request' => '5.814';
+ requires 'HTTP::Response' => '5.813';
requires 'HTTP::Request::AsCGI' => '0.8';
requires 'LWP::UserAgent';
requires 'Module::Pluggable' => '3.9';
test_requires 'Class::Data::Inheritable';
test_requires 'Test::Exception';
+test_requires 'Test::More' => '0.88';
# aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available
if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.35_05')) {
map { glob } qw[t/*.t t/aggregate/*.t];
}
author_requires 'CatalystX::LeakChecker', '0.03'; # Skipped if this isn't installed
+author_requires 'File::Copy::Recursive'; # For http server test
author_tests 't/author';
author_requires(map {; $_ => 0 } qw(
my $name = $class->config->{name} || 'Application';
$class->log->info("$name powered by Catalyst $Catalyst::VERSION");
}
- $class->log->_flush() if $class->log->can('_flush');
# Make sure that the application class becomes immutable at this point,
B::Hooks::EndOfScope::on_scope_end {
) unless $meta->is_immutable;
};
+ if ($class->config->{case_sensitive}) {
+ $class->log->warn($class . "->config->{case_sensitive} is set.");
+ $class->log->warn("This setting is deprecated and planned to be removed in Catalyst 5.81.");
+ }
+
$class->setup_finalize;
+ # Should be the last thing we do so that user things hooking
+ # setup_finalize can log..
+ $class->log->_flush() if $class->log->can('_flush');
+ return 1; # Explicit return true as people have __PACKAGE__->setup as the last thing in their class. HATE.
}
$class->setup_finished(1);
}
- =head2 $c->uri_for( $path, @args?, \%query_values? )
+ =head2 $c->uri_for( $path?, @args?, \%query_values? )
=head2 $c->uri_for( $action, \@captures?, @args?, \%query_values? )
provided path, and the additional arguments and query parameters provided.
When used as a string, provides a textual URI.
+ If no arguments are provided, the URI for the current action is returned.
+ To return the current action and also provide @args, use
+ C<< $c->uri_for( $c->action, @args ) >>.
+
If the first argument is a string, it is taken as a public URI path relative
to C<< $c->namespace >> (if it doesn't begin with a forward slash) or
relative to the application root (if it does). It is then merged with
}
if ( blessed($path) ) { # action object
- my $captures = ( scalar @args && ref $args[0] eq 'ARRAY'
- ? shift(@args)
- : [] );
+ my $captures = [ map { s|/|%2F|; $_; }
+ ( scalar @args && ref $args[0] eq 'ARRAY'
+ ? @{ shift(@args) }
+ : ()) ];
my $action = $path;
$path = $c->dispatcher->uri_for_action($action, $captures);
if (not defined $path) {
carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
+ s|/|%2F| for @args;
unshift(@args, $path);
=item *
- C<case_sensitive> - Makes private paths case sensitive. See L</CASE SENSITIVITY>.
-
- =item *
-
C<default_model> - The default model picked if you say C<< $c->model >>. See L</$c->model($name)>.
=item *
MyApp->config(show_internal_actions => 1);
- =head1 CASE SENSITIVITY
-
- By default Catalyst is not case sensitive, so C<MyApp::C::FOO::Bar> is
- mapped to C</foo/bar>. You can activate case sensitivity with a config
- parameter.
-
- MyApp->config(case_sensitive => 1);
-
- This causes C<MyApp::C::Foo::Bar> to map to C</Foo/Bar>.
-
=head1 ON-DEMAND PARSER
The request body is usually parsed at the beginning of a request,