From: Kennedy Clark Date: Sat, 24 May 2008 11:31:16 +0000 (+0000) Subject: Add additional information for transition from YAML to Config::General X-Git-Tag: v5.8005~305 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=15e1d0b201341bf72fbf027d1450bbddac49e80f;hp=c010ae0de590159369925f16f03dcad4732a91e6 Add additional information for transition from YAML to Config::General --- diff --git a/lib/Catalyst/Manual/Tutorial/Authentication.pod b/lib/Catalyst/Manual/Tutorial/Authentication.pod index cbaa099..3990f74 100644 --- a/lib/Catalyst/Manual/Tutorial/Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/Authentication.pod @@ -287,10 +287,18 @@ backed session store). Although C<__PACKAGE__-Econfig(name =E 'value');> is still supported, newer Catalyst applications tend to place all configuration -information in C and automatically load this information +information in C and automatically load this information into Cconfig> using the -L plugin. Here, we need -to load several parameters that tell +L plugin. + +First, as noted in Part 3 of the tutorial, Catalyst has recently +switched from a default config file format of YAML to +C (an apache-like format). In case you are using +a version of Catalyst earlier than v5.7014, delete the C +file and simply follow the directions below to create a new +C file. + +Here, we need to load several parameters that tell L where to locate information in your database. To do this, edit the C file and update it to match: diff --git a/lib/Catalyst/Manual/Tutorial/Intro.pod b/lib/Catalyst/Manual/Tutorial/Intro.pod index b556adc..9b449ef 100644 --- a/lib/Catalyst/Manual/Tutorial/Intro.pod +++ b/lib/Catalyst/Manual/Tutorial/Intro.pod @@ -325,7 +325,7 @@ And remove the comments from the lines under the comments about the Install Catalyst: sudo apt-get update - sudo apt-get install libdbd-sqlite3-perl libcatalyst-perl libcatalyst-modules-perl + sudo apt-get install libdbd-sqlite3-perl libcatalyst-perl libcatalyst-modules-perl libconfig-general-perl Accept all of the dependencies. Done. diff --git a/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod index 29ea997..4c9fda5 100644 --- a/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod @@ -140,6 +140,30 @@ very similar to Apache configuration files. We will see how to use this feature of Catalyst during the authentication and authorization sections (Part 5 and Part 6). +B: If you are following along in Ubuntu 8.04 or +otherwise using a version of Catalyst prior to v5.7014, you need to be +aware that Catalyst changed from a default format of YAML to the more +straightforward C format. Because Catalyst has long +supported both formats, this tutorial will simply use a configuration +file called C instead of C and Catatlyst will +automcatically use the new format. Just be aware that earlier versions +of Catalyst will still create the C file and that you will +need to B> and create a new C file by +hand, but otherwise this transition is very painless. The default +contents of C should only consist of one line: C. Also be aware that you can continue to use any format +supported by +L and +L, including YAML -- Catalyst will +automatically look for any of the supported configuration file formats. + +C: This script can be useful for converting between configuration +formats: + + perl -Ilib -e 'use MyApp; use Config::General; + Config::General->new->save_file("myapp.conf", MyApp->config);' + + =item * L