X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F02_CatalystBasics.pod;h=99b531b978dce709cf4712c69976396b819420aa;hp=08b26e27fe1fd6b800f9b38515636ca141a6d0b4;hb=429d1caf111575afa4c25287cc48d7ed712af327;hpb=24acc5d75bb4208eeef4d1bad0974f0fd5893454 diff --git a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod index 08b26e2..99b531b 100644 --- a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod @@ -146,7 +146,7 @@ directories and files it creates: Changes # Record of application changes lib # Lib directory for your app's Perl modules Hello # Application main code directory - Controller # Directory for Controller modules + Controller # Directory for Controller modules Model # Directory for Models View # Directory for Views Hello.pm # Base application module @@ -164,9 +164,9 @@ directories and files it creates: hello_server.pl # The normal development server hello_test.pl # Test your app from the command line t # Directory for tests - 01app.t # Test scaffold - 02pod.t - 03podcoverage.t + 01app.t # Test scaffold + 02pod.t + 03podcoverage.t Catalyst will "auto-discover" modules in the Controller, Model, and View @@ -202,18 +202,18 @@ C to breakout of the dev server) if you prefer. .----------------------------------------------------------------------------. | Catalyst::Plugin::ConfigLoader 0.30 | '----------------------------------------------------------------------------' - + [debug] Loaded dispatcher "Catalyst::Dispatcher" [debug] Loaded engine "Catalyst::Engine" - [debug] Found home "/root/Hello" - [debug] Loaded Config "/root/Hello/hello.conf" + [debug] Found home "/home/catalyst/Hello" + [debug] Loaded Config "/home/catalyst/Hello/hello.conf" [debug] Loaded components: .-----------------------------------------------------------------+----------. | Class | Type | +-----------------------------------------------------------------+----------+ | Hello::Controller::Root | instance | '-----------------------------------------------------------------+----------' - + [debug] Loaded Private actions: .----------------------+--------------------------------------+--------------. | Private | Class | Method | @@ -222,7 +222,7 @@ C to breakout of the dev server) if you prefer. | /end | Hello::Controller::Root | end | | /index | Hello::Controller::Root | index | '----------------------+--------------------------------------+--------------' - + [debug] Loaded Path actions: .-------------------------------------+--------------------------------------. | Path | Private | @@ -230,7 +230,7 @@ C to breakout of the dev server) if you prefer. | / | /index | | / | /default | '-------------------------------------+--------------------------------------' - + [info] Hello powered by Catalyst 5.90002 HTTP::Server::PSGI: Accepting connections at http://0:3000/ @@ -271,7 +271,7 @@ browser. sub index :Path :Args(0) { my ( $self, $c ) = @_; - + # Hello World $c->response->body( $c->welcome_message ); } @@ -282,12 +282,12 @@ as a "404" message or a redirect, but for now just leave it alone. The "C<$c>" here refers to the Catalyst context, which is used to access the Catalyst application. In addition to many other things, the Catalyst context provides access to "response" and "request" objects. (See -L, L, and +L, L, and L) -C<$c-Eresponse-Ebody> sets the HTTP response (see +C<< $c->response->body >> sets the HTTP response (see L), while -C<$c-Ewelcome_message> is a special method that returns the welcome +C<< $c->welcome_message >> is a special method that returns the welcome message that you saw in your browser. The ":Path :Args(0)" after the method name are attributes which @@ -312,13 +312,13 @@ to the package C, and the C method. While you leave the C