X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FIntro.pod;h=1b948ede8fd6625154c860ea1f4483c12f5cab66;hp=36adc7ce83b287d198894184eac1715e56b610c2;hb=f279297ad42ed1dc1fc4e2289a4a1dc17acf91d7;hpb=b411df01b40662f125aa854a7c25097bc53ad86a diff --git a/lib/Catalyst/Manual/Intro.pod b/lib/Catalyst/Manual/Intro.pod index 36adc7c..1b948ed 100644 --- a/lib/Catalyst/Manual/Intro.pod +++ b/lib/Catalyst/Manual/Intro.pod @@ -97,18 +97,18 @@ doesn't require mod_rewrite or class and method names in URLs. With Catalyst you register your actions and address them directly. For example: - sub hello : Global { + sub hello : Local { my ( $self, $context ) = @_; $context->response->body('Hello World!'); } Now http://localhost:3000/hello prints "Hello World!". -Note that actions with the C< :Local > attribute are equivalent to -using a C<:Path('/action_name') > attribute (note the leading slash). -So our action could be equivalently: +Note that actions with the C< :Global > attribute are equivalent to +using a C<:Path('action_name') > attribute, so our action could be +equivalently: - sub hello : Path('/hello') { + sub hi : Path('hello') { my ( $self, $context ) = @_; $context->response->body('Hello World!'); } @@ -927,7 +927,7 @@ Called at the end of a request, after all matching actions are called. =head4 Built-in actions in controllers/autochaining - Package MyApp::Controller::Foo; + package MyApp::Controller::Foo; sub begin : Private { } sub default : Path { } sub auto : Private { } @@ -962,15 +962,13 @@ would be called: =item for a request for C - MyApp::begin - MyApp::auto + MyApp::Controller::Foo::auto MyApp::Controller::Foo::default # in the absence of MyApp::Controller::Foo::Foo - MyApp::end + MyApp::Controller::Foo::end =item for a request for C MyApp::Controller::Foo::Bar::begin - MyApp::auto MyApp::Controller::Foo::auto MyApp::Controller::Foo::Bar::auto MyApp::Controller::Foo::Bar::default # for MyApp::Controller::Foo::Bar::foo @@ -990,7 +988,6 @@ like this: false MyApp::Controller::Foo::Bar::begin - MyApp::auto MyApp::Controller::Foo::Bar::end =back