---
name: Catalyst
-version: 5.49_01
+version: 5.49_02
author:
- 'Sebastian Riedel, C<sri@oook.de>'
abstract: The Elegant MVC Web Application Framework
HTTP::Request: 0
HTTP::Response: 0
LWP::UserAgent: 0
+ MIME::Types: 0
Module::Pluggable::Fast: 0.16
NEXT: 0
Path::Class: 0.09
Tree::Simple::Visitor::FindByPath: 0
UNIVERSAL::require: 0
URI: 1.35
- URI::Query: 0
perl: 5.8.1
recommends:
Catalyst::Engine::Apache: 0
provides:
Catalyst:
file: lib/Catalyst.pm
- version: 5.49_01
+ version: 5.49_02
Catalyst::Action:
file: lib/Catalyst/Action.pm
+ Catalyst::ActionContainer:
+ file: lib/Catalyst/ActionContainer.pm
Catalyst::Base:
file: lib/Catalyst/Base.pm
Catalyst::Build:
file: lib/Catalyst/Build.pm
+ Catalyst::DispatchType:
+ file: lib/Catalyst/DispatchType.pm
+ Catalyst::DispatchType::Default:
+ file: lib/Catalyst/DispatchType/Default.pm
+ Catalyst::DispatchType::Index:
+ file: lib/Catalyst/DispatchType/Index.pm
+ Catalyst::DispatchType::Path:
+ file: lib/Catalyst/DispatchType/Path.pm
+ Catalyst::DispatchType::Regex:
+ file: lib/Catalyst/DispatchType/Regex.pm
Catalyst::Dispatcher:
file: lib/Catalyst/Dispatcher.pm
Catalyst::Engine:
version: 0.01
Catalyst::Log:
file: lib/Catalyst/Log.pm
+ Catalyst::Plugin::Static::Simple:
+ file: lib/Catalyst/Plugin/Static/Simple.pm
+ version: 0.11
Catalyst::Request:
file: lib/Catalyst/Request.pm
Catalyst::Request::Upload:
file: lib/Catalyst/Test.pm
Catalyst::Utils:
file: lib/Catalyst/Utils.pm
-generated_by: Module::Build version 0.2611
+generated_by: Module::Build version 0.2607
use Catalyst 'My::Module';
- Special flags like -Debug and -Engine can also be specifed as arguments
+ Special flags like -Debug and -Engine can also be specified as arguments
when Catalyst is loaded:
use Catalyst qw/-Debug My::Module/;
Specify log level.
METHODS
+ $c->action
+ Accessor for the current action
+
$c->comp($name)
$c->component($name)
Get a component object by name.
$c->forward(qw/MyApp::Model::CDBI::Foo do_stuff/);
$c->forward('MyApp::View::TT');
+ $c->namespace
+ Accessor to the namespace of the current action
+
+ $c->path_to(@path)
+ Merges @path with $c->config->{home} and returns a Path::Class
+ object.
+
+ For example:
+
+ $c->path_to( 'db', 'sqlite.db' );
+
$c->setup
Setup.
$c->setup;
- $c->uri_for($path)
+ $c->uri_for($path,[@args])
Merges path with $c->request->base for absolute uri's and with
$c->request->match for relative uri's, then returns a normalized URI
- object.
+ object. If any args are passed, they are added at the end of the
+ path.
$c->error
$c->error($error, ...)
$c->error('Something bad happened');
+ Clean errors.
+
+ $c->error(0);
+
$c->engine
Contains the engine instance. Stringifies to the class.
$c->stash
Returns a hashref containing all your data.
- $c->stash->{foo} ||= 'yada';
print $c->stash->{foo};
+ Keys may be set in the stash by assigning to the hash reference, or
+ by passing either a single hash reference or a list of key/value
+ pairs as arguments.
+
+ For example:
+
+ $c->stash->{foo} ||= 'yada';
+ $c->stash( { moose => 'majestic', qux => 0 } );
+ $c->stash( bar => 1, gorch => 2 );
+
+ $c->welcome_message
+ Returns the Catalyst welcome HTML page.
+
INTERNAL METHODS
$c->benchmark($coderef)
Takes a coderef with arguments and returns elapsed time as float.
$c->prepare_body
Prepare message body.
+ $c->prepare_body_chunk( $chunk )
+ Prepare a chunk of data before sending it to HTTP::Body.
+
$c->prepare_body_parameters
Prepare body parameters.
you will need to manually set the Content-Length header to the
length of your output data, if known.
+ version
+ Returns the Catalyst version number. mostly useful for powered by
+ messages in template systems.
+
CASE SENSITIVITY
By default Catalyst is not case sensitive, so "MyApp::C::FOO::Bar"
becomes "/foo/bar".
Andy Wardley
+ Andreas Marienborg
+
+ Andrew Bramble
+
Andrew Ford
Andrew Ruthven
Ulf Edvinsson
+ Yuval Kogman
+
AUTHOR
Sebastian Riedel, "sri@oook.de"
LICENSE
- This library is free software . You can redistribute it and/or modify it
- under the same terms as perl itself.
+ This library is free software, you can redistribute it and/or modify it
+ under the same terms as Perl itself.
TestApp::Controller::Action::Auto->begin
TestApp::Controller::Action::Auto->auto
TestApp::Controller::Action::Auto->one
+ TestApp->end
];
my $expected = join( ", ", @expected );
TestApp::Controller::Action::Auto->begin
TestApp::Controller::Action::Auto->auto
TestApp::Controller::Action::Auto->default
+ TestApp->end
];
my $expected = join( ", ", @expected );
TestApp::Controller::Action::Auto->auto
TestApp::Controller::Action::Auto::Deep->auto
TestApp::Controller::Action::Auto::Deep->one
+ TestApp->end
];
my $expected = join( ", ", @expected );
TestApp::Controller::Action::Auto->auto
TestApp::Controller::Action::Auto::Deep->auto
TestApp::Controller::Action::Auto::Deep->default
+ TestApp->end
];
my $expected = join( ", ", @expected );
TestApp::Controller::Action::Begin->begin
TestApp::Controller::Action::Begin->default
TestApp::View::Dump::Request->process
+ TestApp->end
];
my $expected = join( ", ", @expected );
TestApp::Controller::Action::Default->begin
TestApp::Controller::Action::Default->default
TestApp::View::Dump::Request->process
+ TestApp->end
];
my $expected = join( ", ", @expected );
TestApp::Controller::Action::Detach->one\r
TestApp::Controller::Action::Detach->two\r
TestApp::View::Dump::Request->process\r
+ TestApp->end\r
];\r
\r
my $expected = join( ", ", @expected );\r
TestApp::Controller::Action::Detach->path\r
TestApp::Controller::Action::Detach->two\r
TestApp::View::Dump::Request->process\r
+ TestApp->end\r
];\r
\r
my $expected = join( ", ", @expected );\r
TestApp::Controller::Action::Forward->four
TestApp::Controller::Action::Forward->five
TestApp::View::Dump::Request->process
+ TestApp->end
];
my $expected = join( ", ", @expected );
TestApp::Controller::Action::Forward->four
TestApp::Controller::Action::Forward->five
TestApp::View::Dump::Request->process
+ TestApp->end
];
my $expected = join( ", ", @expected );
BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; }
-use Test::More tests => 19*$iters;
+use Test::More tests => 20*$iters;
use Catalyst::Test 'TestApp';
if ( $ENV{CAT_BENCHMARK} ) {
sub run_tests {
# test root index
{
+ my @expected = qw[
+ TestApp->index
+ TestApp->end
+ ];
+
+ my $expected = join( ", ", @expected );
ok( my $response = request('http://localhost/'), 'root index' );
+ is( $response->header('X-Catalyst-Executed'),
+ $expected, 'Executed actions' );
is( $response->content, 'root index', 'root index ok' );
ok( $response = request('http://localhost'), 'root index no slash' );
{
my @expected = qw[
TestApp::Controller::Index->index
+ TestApp->end
];
my $expected = join( ", ", @expected );
my @expected = qw[
TestApp::Controller::Action::Index->begin
TestApp::Controller::Action::Index->index
+ TestApp->end
];
my $expected = join( ", ", @expected );
my @expected = qw[
TestApp::Controller::Action::Index->begin
TestApp::Controller::Action::Index->default
+ TestApp->end
];
my $expected = join( ", ", @expected );
use strict;
-use base 'Class::Data::Inheritable';
+use base qw/Catalyst::Base Class::Data::Inheritable/;
__PACKAGE__->mk_classdata('ran_setup');
}
+sub end : Private {
+ my ($self,$c) = @_;
+}
+
1;
$c->forward('TestApp::View::Dump::Request');
}
+
sub execute {
my $c = shift;
my $class = ref( $c->component( $_[0] ) ) || $_[0];
elsif ( $action =~ /\/(\w+)$/ ) {
$method = $1;
}
+ elsif ( $action =~ /^(\w+)$/ ) {
+ $method = $action;
+ }
+
if ( $class && $method && $method !~ /^_/ ) {
my $executed = sprintf( "%s->%s", $class, $method );