[Catalyst-commits] r8092 - / trunk/Catalyst-Manual/lib/Catalyst
trunk/Catalyst-Manual/lib/Catalyst/Manual
trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial
zarquon at dev.catalyst.perl.org
zarquon at dev.catalyst.perl.org
Wed Jul 9 13:07:52 BST 2008
Author: zarquon
Date: 2008-07-09 13:07:52 +0100 (Wed, 09 Jul 2008)
New Revision: 8092
Modified:
/
trunk/Catalyst-Manual/lib/Catalyst/Manual.pm
trunk/Catalyst-Manual/lib/Catalyst/Manual/Cookbook.pod
trunk/Catalyst-Manual/lib/Catalyst/Manual/Intro.pod
trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authentication.pod
trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authorization.pod
trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod
Log:
r13588 at zaphod: kd | 2008-07-09 21:29:52 +1000
rollback to use Catalyst qw/@plugins/
Property changes on:
___________________________________________________________________
Name: svk:merge
- 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:13587
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
+ 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:13588
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
Modified: trunk/Catalyst-Manual/lib/Catalyst/Manual/Cookbook.pod
===================================================================
--- trunk/Catalyst-Manual/lib/Catalyst/Manual/Cookbook.pod 2008-07-09 12:07:21 UTC (rev 8091)
+++ trunk/Catalyst-Manual/lib/Catalyst/Manual/Cookbook.pod 2008-07-09 12:07:52 UTC (rev 8092)
@@ -62,11 +62,10 @@
=head2 Enable debug status in the environment
Normally you enable the debugging info by adding the C<-Debug> flag to
-your C<use Catalyst> statement (or C<__PACKAGE__->setup(qw/-Debug/)
-). However, you can also enable it using environment variable, so you
-can (for example) get debug info without modifying your application
-scripts. Just set C<CATALYST_DEBUG> or C<E<lt>MYAPPE<gt>_DEBUG> to a
-true value.
+your C<use Catalyst> statement . However, you can also enable it using
+environment variable, so you can (for example) get debug info without
+modifying your application scripts. Just set C<CATALYST_DEBUG> or
+C<E<lt>MYAPPE<gt>_DEBUG> to a true value.
=head2 Sessions
@@ -114,11 +113,11 @@
=head3 EXAMPLE
use parent qw/Catalyst/;
- __PACKAGE__->setup( qw/
+ use Catalyst qw/
Session
Session::Store::FastMmap
Session::State::Cookie
- /;)
+ /;
## Write data into the session
@@ -269,12 +268,11 @@
implementing roles:
use parent qw/Catalyst/;
- __PACKAGE__->setup (qw/
+ use Catalyst qw/
Authentication
Authentication::Credential::Password
Authentication::Store::Htpasswd
- Authorization::Roles
- /);
+ Authorization::Roles/;
Roles are implemented automatically when using
L<Catalyst::Authentication::Store::Htpasswd>:
@@ -404,10 +402,10 @@
=head3 EXAMPLE
use parent qw/Catalyst/;
- __PACKAGE__->setup( qw/Authentication
- Authentication::Credential::Password
- Authentication::Store::Htpasswd
- Authorization::Roles/);
+ use Catalyst qw/Authentication
+ Authentication::Credential::Password
+ Authentication::Store::Htpasswd
+ Authorization::Roles/;
__PACKAGE__->config->{authentication}{htpasswd} = "passwdfile";
@@ -501,10 +499,10 @@
control checks. Let's load it:
use parent qw/Catalyst/;
- __PACKAGE__->setup(qw/
- Authentication # yadda yadda
- Authorization::Roles
- /);
+ use Catalyst qw/
+ Authentication # yadda yadda
+ Authorization::Roles
+ /;
And now our action should look like this:
@@ -718,7 +716,7 @@
3. Add the XMLRPC plugin to MyApp.pm
- __PACKAGE__->setup( qw/-Debug Static::Simple XMLRPC/);
+ use Catalyst qw/-Debug Static::Simple XMLRPC/;
4. Add an API controller
@@ -1912,7 +1910,7 @@
Using the plugin is as simple as setting your use line in MyApp.pm to include:
- __PACKAGE__->setup( qw/Static::Simple/);
+ use Catalyst qw/Static::Simple/;
and already files will be served.
@@ -1997,7 +1995,7 @@
In your main application class (MyApp.pm), load the plugin:
- __PACKAGE__->setup( qw/-Debug FormValidator Static OtherPlugin/);
+ use Catalyst qw/-Debug FormValidator Static OtherPlugin/;
You will also need to make sure your end method does I<not> forward
static content to the view, perhaps like this:
@@ -2112,7 +2110,7 @@
application for a cache because the source document changes
infrequently but may be viewed many times.
- __PACKAGE__->setup( qw/Cache::FileCache/);
+ use Catalyst qw/Cache::FileCache/;
...
@@ -2160,7 +2158,7 @@
We can add the PageCache plugin to speed things up.
- __PACKAGE__->setup( qw/Cache::FileCache PageCache/);
+ use Catalyst qw/Cache::FileCache PageCache/;
sub front_page : Path ('/') {
my ( $self, $c ) = @_;
Modified: trunk/Catalyst-Manual/lib/Catalyst/Manual/Intro.pod
===================================================================
--- trunk/Catalyst-Manual/lib/Catalyst/Manual/Intro.pod 2008-07-09 12:07:21 UTC (rev 8091)
+++ trunk/Catalyst-Manual/lib/Catalyst/Manual/Intro.pod 2008-07-09 12:07:52 UTC (rev 8092)
@@ -574,9 +574,7 @@
use strict;
use parent qw/Catalyst/;
- __PACKAGE__->setup(qw/-Debug ConfigLoader Static::Simple/);
- # note you can still use use Catalyst qw/@plugins/ instead of the
- # above two lines
+ use Catalyst qw/-Debug ConfigLoader Static::Simple/;
MyApp->config(
name => 'My Application',
Modified: trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authentication.pod
===================================================================
--- trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authentication.pod 2008-07-09 12:07:21 UTC (rev 8091)
+++ trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authentication.pod 2008-07-09 12:07:52 UTC (rev 8092)
@@ -247,7 +247,7 @@
Edit C<lib/MyApp.pm> and update it as follows (everything below
C<StackTrace> is new):
- __PACKAGE__->setup(qw/
+ use Catalyst qw/
-Debug
ConfigLoader
Static::Simple
@@ -259,7 +259,7 @@
Session
Session::Store::FastMmap
Session::State::Cookie
- /);
+ /;
The C<Authentication> plugin supports Authentication while the
C<Session> plugins are required to maintain state across multiple HTTP
Modified: trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authorization.pod
===================================================================
--- trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authorization.pod 2008-07-09 12:07:21 UTC (rev 8091)
+++ trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authorization.pod 2008-07-09 12:07:52 UTC (rev 8092)
@@ -74,7 +74,7 @@
Edit C<lib/MyApp.pm> and add C<Authorization::Roles> to the list:
- __PACKAGE__->setup(qw/
+ use Catalyst qw/
-Debug
ConfigLoader
Static::Simple
@@ -87,7 +87,7 @@
Session
Session::Store::FastMmap
Session::State::Cookie
- /);
+ /;
=head2 Add Config Information for Authorization
Modified: trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod
===================================================================
--- trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod 2008-07-09 12:07:21 UTC (rev 8091)
+++ trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod 2008-07-09 12:07:52 UTC (rev 8092)
@@ -181,18 +181,18 @@
generally referred to as your I<application class>) and delete the line
with:
- __PACKAGE__->setup(qw/-Debug ConfigLoader Static::Simple/);
+ use Catalyst qw/-Debug ConfigLoader Static::Simple/;
Replace it with:
- __PACKAGE__->setup(qw/
- -Debug
- ConfigLoader
- Static::Simple
-
- StackTrace
- /);
+ use Catalyst qw/
+ -Debug
+ ConfigLoader
+ Static::Simple
+ StackTrace
+ /;
+
This tells Catalyst to start using one new plugin:
=over 4
Modified: trunk/Catalyst-Manual/lib/Catalyst/Manual.pm
===================================================================
--- trunk/Catalyst-Manual/lib/Catalyst/Manual.pm 2008-07-09 12:07:21 UTC (rev 8091)
+++ trunk/Catalyst-Manual/lib/Catalyst/Manual.pm 2008-07-09 12:07:52 UTC (rev 8092)
@@ -23,6 +23,6 @@
=cut
-our $VERSION = '5.7012';
+our $VERSION = '5.7013';
1;
More information about the Catalyst-commits
mailing list