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=2319bea339e4014ac7f127ab78d582c7ed4d8698;hp=18ed64577d9002345c62dba5013225ad101cd532;hb=608ea8afc33ba2fd406e19111720fac2cfe7ce39;hpb=3d0b2e0b0e6d80f6d419d22a6b504935af6dc84f diff --git a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod index 18ed645..2319bea 100644 --- a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod @@ -56,8 +56,8 @@ L =head1 DESCRIPTION -In this chapter of the tutorial, we will create a very basic Catalyst -web application, demonstrating a number of powerful capabilities, such +In this chapter of the tutorial, we will create a very basic Catalyst +web application, demonstrating a number of powerful capabilities, such as: =over 4 @@ -74,7 +74,7 @@ clean "separation of control" between the different portions of your application. Given that many other documents cover this subject in detail, MVC will not be discussed in depth here (for an excellent introduction to MVC and general Catalyst concepts, please see -L). In short: +L). In short: =over 4 @@ -89,7 +89,7 @@ database. The view takes model objects and renders them into something for the end user to look at. Normally this involves a template-generation tool that creates HTML for the user's web browser, but it could easily be code -that generates other forms such as PDF documents, e-mails, spreadsheets, +that generates other forms such as PDF documents, e-mails, spreadsheets, or even "behind the scenes" formats such as XML and JSON. =item * Controller @@ -110,20 +110,20 @@ automatically create our Catalyst model for use with a database. You can checkout the source code for this example from the catalyst subversion repository as per the instructions in -L. +L. =head1 CREATE A CATALYST PROJECT -Catalyst provides a number of helper scripts that can be used to -quickly flesh out the basic structure of your application. All -Catalyst projects begin with the C helper (see -L for more information on helpers). -Also note that as of Catalyst 5.7000, you will not have the helper -scripts unless you install both L -and L. +Catalyst provides a number of helper scripts that can be used to quickly +flesh out the basic structure of your application. All Catalyst projects +begin with the C helper (see +L for more information on helpers). +Also note that as of Catalyst 5.7000, you will not have the helper +scripts unless you install both L +and L. -In this first chapter of the tutorial, use the Catalyst C +In this first chapter of the tutorial, use the Catalyst C script to initialize the framework for an application called C: $ catalyst.pl Hello @@ -169,38 +169,44 @@ directories and files it creates: 03podcoverage.t -Catalyst will "auto-discover" modules in the Controller, Model, and -View directories. When you use the hello_create.pl script it will -create Perl module scaffolds in those directories, plus test files in -the "t" directory. The default location for templates is in the "root" -directory. The scripts in the script directory will always start with -the lowercased version of your application name. If your app is -MaiTai, then the create script would be "maitai_create.pl". - -Though it's too early for any significant celebration, we already have -a functioning application. We can use the Catalyst supplied script to -start up a development server and view the default Catalyst page in -your browser. All scripts in the script directory should be run from -the base directory of your application, so change to the Hello -directory. - -Run the following command to start up the built-in development web -server (make sure you didn't forget the "C" from the -previous step): - - $ script/hello_server.pl +Catalyst will "auto-discover" modules in the Controller, Model, and View +directories. When you use the C script it will create Perl +module scaffolds in those directories, plus test files in the "t" +directory. The default location for templates is in the "root" +directory. The scripts in the script directory will always start with +the lowercased version of your application name. If your app is MaiTai, +then the create script would be "maitai_create.pl". + +Though it's too early for any significant celebration, we already have a +functioning application. We can use the Catalyst supplied script to +start up a development server and view the default Catalyst page in your +browser. All scripts in the script directory should be run from the base +directory of your application, so change to the Hello directory. + +Run the following command to start up the built-in development web +server (make sure you didn't forget the "C" from the previous +step): + +B: The "-r" argument enables reloading on code changes so you +don't have to stop and start the server when you update code. See +C or C