[Catalyst-commits] r9995 -
Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial
hkclark at dev.catalyst.perl.org
hkclark at dev.catalyst.perl.org
Sun May 3 18:57:13 GMT 2009
Author: hkclark
Date: 2009-05-03 18:57:13 +0000 (Sun, 03 May 2009)
New Revision: 9995
Modified:
Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Authentication.pod
Log:
Add code in case users prefer to use myapp.conf for auth config
Modified: Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Authentication.pod
===================================================================
--- Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Authentication.pod 2009-05-03 14:41:13 UTC (rev 9994)
+++ Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Authentication.pod 2009-05-03 18:57:13 UTC (rev 9995)
@@ -316,9 +316,31 @@
We could have placed this configuration in C<myapp.conf>, but placing
it in C<lib/MyApp.pm> is probably a better place since it's not likely
something that users of your application will want to change during
-deployment.
+deployment (or you could use a mixture: leave C<class> and
+C<user_model> defined in C<lib/MyApp.pm> as we show above, but place
+C<password_type> in C<myapp.conf> to allow the type of password to be
+easily modified during deployment). We will stick with putting
+all of the authentication-related configuration in C<lib/MyApp.pm>
+for the tutorial, but if you wish to use C<myapp.conf>, just convert
+to the following code:
+ <Plugin::Authentication>
+ use_session 1
+ <default>
+ password_type self_check
+ user_model DB::Users
+ class SimpleDB
+ </default>
+ </Plugin::Authentication>
+B<TIP:> Here is a short script that will dump the contents of
+C<MyApp->config> to L<Config::General|Config::General> format in
+C<myapp.conf>:
+
+ $ perl -Ilib -e 'use MyApp; use Config::General;
+ Config::General->new->save_file("myapp.conf", MyApp->config);'
+
+
=head2 Add Login and Logout Controllers
Use the Catalyst create script to create two stub controller files:
More information about the Catalyst-commits
mailing list