From: Kieren Diment Date: Sat, 16 Aug 2008 06:52:29 +0000 (+0000) Subject: clarified something about :Path and :Local similarities X-Git-Tag: v5.8005~261 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=a8df13c3fe1e41e7b127b17279d4a15b54643671 clarified something about :Path and :Local similarities --- diff --git a/lib/Catalyst/Manual/Intro.pod b/lib/Catalyst/Manual/Intro.pod index 36adc7c..e34920e 100644 --- a/lib/Catalyst/Manual/Intro.pod +++ b/lib/Catalyst/Manual/Intro.pod @@ -97,7 +97,7 @@ 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!'); } @@ -105,10 +105,10 @@ example: 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: +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!'); }