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=e34920e6918c0390e2a004e03eb36d2711465527;hp=4749dae1f76ae79bf0737817ae9a63749c7563f1;hb=a8df13c3fe1e41e7b127b17279d4a15b54643671;hpb=4299d9f5d43af74cdd91f61d7b0d1a132995f377 diff --git a/lib/Catalyst/Manual/Intro.pod b/lib/Catalyst/Manual/Intro.pod index 4749dae..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!'); } @@ -168,11 +168,14 @@ running, using the helper scripts described above. =head3 Install -Installation of Catalyst can be a time-consuming and frustrating -effort, due to its large number of dependencies. The easiest way -to get up and running is to use Matt Trout's C -script, from L, -and then install L. +Installation of Catalyst can be a time-consuming effort, due to its +large number of dependencies. Although most of the frustrations +associated with this are now ironed out and a simple C or C are now usually +straightforward, if you still have problems, you can use use Matt +Trout's C script, from +L, and then +install L. # perl cat-install # perl -MCPAN -e 'install Catalyst::Devel' @@ -184,6 +187,16 @@ and then install L. $ cd MyApp $ script/myapp_create.pl controller Library::Login +=head4 Frank Speiser's Amazon EC2 Catalyst SDK + +There are currently two flavors of publicly available Amazon Machine +Images (AMI) that include all the elements you'd need to begin +developing in a fully functional Catalyst environment within +minutes. See +L for +more details. + + =head3 Run $ script/myapp_server.pl @@ -560,9 +573,8 @@ configure your application, load plugins, and extend Catalyst. package MyApp; use strict; - use Catalyst qw/-Debug/; # Add other plugins here, e.g. - # for session support - + use parent qw/Catalyst/; + use Catalyst qw/-Debug ConfigLoader Static::Simple/; MyApp->config( name => 'My Application', @@ -887,7 +899,8 @@ call these built-in private actions in your application class: Called when no other action matches. Could be used, for example, for displaying a generic frontpage for the main app, or an error page for -individual controllers. +individual controllers. B: in older Catalyst applications you +will see C which is roughly speaking equivalent. =item * B @@ -897,7 +910,9 @@ it is weighted slightly higher in the matching process. It is useful as a static entry point to a controller, e.g. to have a static welcome page. Note that it's also weighted higher than Path. Actually the sub name C can be called anything you want. The sub attributes are -what determines the behaviour of the action. +what determines the behaviour of the action. B: in older +Catalyst applications, you will see C used, which is +roughly speaking equivalent. =item * B