From: Sebastian Riedel Date: Wed, 2 Mar 2005 01:02:07 +0000 (+0000) Subject: Improved docs X-Git-Tag: 5.7099_04~1797 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=d7c505f31a1c555f2cc3bee7ddfb550a808cd091 Improved docs --- diff --git a/Changes b/Changes index febeaee..7695a0b 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,7 @@ This file documents the revision history for Perl extension Catalyst. 4.01 Tue Mar 01 10:00:00 2005 - improved documentation + - documentation fixes (Johan Lindstrom) 4.00 Sun Feb 27 22:00:00 2005 - more verbose debug messages, especially for forward() diff --git a/bin/catalyst b/bin/catalyst index c5b1855..242ac9e 100755 --- a/bin/catalyst +++ b/bin/catalyst @@ -31,8 +31,8 @@ catalyst [options] application-name application-name has to be a valid Perl module name and can include :: Examples: - catalyst My::App - catalyst MyApp + perl /path/to/catalyst My::App + perl /path/to/catalyst MyApp See also: perldoc Catalyst::Manual diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 5883f09..e49736f 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -188,7 +188,7 @@ Sebastian Riedel, C =head1 THANK YOU Danijel Milicevic, David Naughton, Gary Ashton Jones, Jesse Sheidlower, -Marcus Ramberg and all the others who've helped. +Johan Lindstrom, Marcus Ramberg and all the others who've helped. =head1 LICENSE diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index cc14c94..81258bc 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -257,8 +257,8 @@ test [options] uri -help display this help and exits Examples: - test http://localhost/some_action - test /some_action + perl test http://localhost/some_action + perl test /some_action See also: perldoc Catalyst::Manual @@ -322,13 +322,13 @@ create [options] model|view|controller name [helper] [options] -help display this help and exits Examples: - create controller My::Controller - create view My::View - create view MyView TT - create view TT TT - create model My::Model - create model SomeDB CDBI dbi:SQLite:/tmp/my.db - create model AnotherDB CDBI dbi:Pg:dbname=foo root 4321 + perl create controller My::Controller + perl create view My::View + perl create view MyView TT + perl create view TT TT + perl create model My::Model + perl create model SomeDB CDBI dbi:SQLite:/tmp/my.db + perl create model AnotherDB CDBI dbi:Pg:dbname=foo root 4321 See also: perldoc Catalyst::Manual diff --git a/lib/Catalyst/Manual/Intro.pod b/lib/Catalyst/Manual/Intro.pod index d3177d0..8060966 100644 --- a/lib/Catalyst/Manual/Intro.pod +++ b/lib/Catalyst/Manual/Intro.pod @@ -101,13 +101,13 @@ Here's how to install Catalyst and get a simple application up and running, usin =head3 Setup - $ catalyst My::App + $ perl /path/to/catalyst My::App $ cd My-App - $ bin/create controller My::Controller + $ perl bin/create controller My::Controller =head3 Run - $ bin/server + $ perl bin/server Now visit these locations with your favorite browser or user agent to see Catalyst in action: @@ -252,13 +252,13 @@ Catalyst supports several ways to define Actions: =item * Literal - $c->action( 'foo/bar' => sub { } ); + MyApp->action( 'foo/bar' => sub { } ); Matches only http://localhost:3000/foo/bar. =item * Regex - $c->action( '^/foo(\d+)/bar(\d+)$/' => sub { } ); + MyApp->action( '^/foo(\d+)/bar(\d+)$/' => sub { } ); Matches any URL that matches the pattern in the action key, e.g. http://localhost:3000/foo23/bar42. The pattern must be enclosed with forward slashes, i.e. '/$pattern/'. @@ -267,7 +267,7 @@ If you use capturing parantheses to extract values within the matching URL (23, =item * Namespace-Prefixed package MyApp::Controller::My::Controller; - $c->action( '?foo' => sub { } ); + MyApp->action( '?foo' => sub { } ); Matches http://localhost:3000/my_controller/foo. The action key must be prefixed with '?'. @@ -275,7 +275,7 @@ Prefixing the action key with '?' indicates that the matching URL must be prefix =item * Private - $c->action( '!foo' => sub { } ); + MyApp->action( '!foo' => sub { } ); Matches no URL, and cannot be executed by requesting a URL that corresponds to the action key. Private actions can be executed only inside a Catalyst application, by calling the C method: