From: hkclark Date: Sat, 3 Sep 2011 16:37:08 +0000 (-0400) Subject: Switch from user 'root' to 'catalyst' on VM X-Git-Tag: 5.9003~21 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=477a6d5b13f55eb335979812080e4a11217f19d6 Switch from user 'root' to 'catalyst' on VM Not only to follow 'best practices', but also to avoid potential confusion over /root/ and /root/MyApp/root/ when we are talking about the root directory. Also make it easier for people who want to install X. --- diff --git a/lib/Catalyst/Manual/Tutorial/01_Intro.pod b/lib/Catalyst/Manual/Tutorial/01_Intro.pod index b84c4c4..fa7d9e9 100644 --- a/lib/Catalyst/Manual/Tutorial/01_Intro.pod +++ b/lib/Catalyst/Manual/Tutorial/01_Intro.pod @@ -196,7 +196,7 @@ virtual machine itself -- the thing where you actually do the tutorial (and that you boot up on the "host machine"). B Throughout the tutorial, we will shows the UNIX shell prompt as "C<$>". If you are using Tutorial VM, the prompt will really be -"C", but we will keep it short (and also use "C<$>" in +"C", but we will keep it short (and also use "C<$>" in lieu of "C<#>", since "C<#>" looks too much like a Perl comment). @@ -224,13 +224,14 @@ L. =item 4 -Once you get a login prompt, enter the username B and a password -for C. You should now be at a prompt that looks like: +Once you get a login prompt, enter the username B and a +password for C. You should now be at a prompt that looks +like: - catalyst login: root + catalyst login: catalyst Password: catalyst ... - root@catalyst:~# + catalyst@catalyst:~# =item 5 @@ -275,13 +276,13 @@ tutorial. B, open an SSH client and connect to the IP address found in the previous step. You should get a login prompt (accept the SSH key if you get a warning message about that). Login -with the same username and password as we used in Step 4: B / +with the same username and password as we used in Step 4: B / B - catalyst login: root + catalyst login: catalyst Password: catalyst ... - root@catalyst:~# + catalyst@catalyst:~# =item 7 @@ -352,14 +353,14 @@ You can then start X Windows with: You may note that the Tutorial Virtual Machine uses L so -that the Perl modules are run from ~/perl5 (in this case, /root/perl5) -vs. the usual location of your "system Perl". We recommend that you -also consider using this very handy module. It can greatly ease the -process of maintaining and testing different combinations or Perl -modules across development, staging, and production servers. (The -"relocatable Perl" feature can also be used to to run both the modules -B Perl itself from your home directory [or any other directory you -chose]). +that the Perl modules are run from ~/perl5 (in this case, +/home/catalyst/perl5) vs. the usual location of your "system Perl". We +recommend that you also consider using this very handy module. It can +greatly ease the process of maintaining and testing different +combinations or Perl modules across development, staging, and production +servers. (The "relocatable Perl" feature can also be used to to run +both the modules B Perl itself from your home directory [or any +other directory you chose]). B: Please provide feedback on how the Virtual Machine approach for the tutorial works for you. If you have suggestions or comments, you diff --git a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod index c263c4b..8d5df2f 100644 --- a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod @@ -205,8 +205,8 @@ C to breakout of the dev server) if you prefer. [debug] Loaded dispatcher "Catalyst::Dispatcher" [debug] Loaded engine "Catalyst::Engine" - [debug] Found home "/root/Hello" - [debug] Loaded Config "/root/Hello/hello.conf" + [debug] Found home "/home/catalyst/Hello" + [debug] Loaded Config "/home/catalyst/Hello/hello.conf" [debug] Loaded components: .-----------------------------------------------------------------+----------. | Class | Type | @@ -329,7 +329,7 @@ Notice in the window running the Development Server that you should get output similar to the following: Saw changes to the following files: - - /root/Hello/lib/Hello/Controller/Root.pm (modify) + - /home/catalyst/Hello/lib/Hello/Controller/Root.pm (modify) Attempting to restart the server ... diff --git a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod index 56691be..5137dc4 100644 --- a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod @@ -64,9 +64,9 @@ will be too limited to be of use to anyone, it should provide a basic environment where we can explore a variety of features used in virtually all web applications. -Source code for the tutorial in included in the F directory -of the Tutorial Virtual machine (one subdirectory per chapter). There -are also instructions for downloading the code in +Source code for the tutorial in included in the F +directory of the Tutorial Virtual machine (one subdirectory per +chapter). There are also instructions for downloading the code in L. Please take a look at @@ -299,10 +299,10 @@ Use the Catalyst C script to add a controller for book-related actions: $ script/myapp_create.pl controller Books - exists "/root/MyApp/script/../lib/MyApp/Controller" - exists "/root/MyApp/script/../t" - created "/root/MyApp/script/../lib/MyApp/Controller/Books.pm" - created "/root/MyApp/script/../t/controller_Books.t" + exists "/home/catalyst/MyApp/script/../lib/MyApp/Controller" + exists "/home/catalyst/MyApp/script/../t" + created "/home/catalyst/MyApp/script/../lib/MyApp/Controller/Books.pm" + created "/home/catalyst/MyApp/script/../t/controller_Books.t" Then edit C (as discussed in L of @@ -461,10 +461,10 @@ For our book application, enter the following command to enable the C style of view rendering: $ script/myapp_create.pl view HTML TT - exists "/root/MyApp/script/../lib/MyApp/View" - exists "/root/MyApp/script/../t" - created "/root/MyApp/script/../lib/MyApp/View/HTML.pm" - created "/root/MyApp/script/../t/view_HTML.t" + exists "/home/catalyst/MyApp/script/../lib/MyApp/View" + exists "/home/catalyst/MyApp/script/../t" + created "/home/catalyst/MyApp/script/../lib/MyApp/View/HTML.pm" + created "/home/catalyst/MyApp/script/../t/view_HTML.t" This creates a view called C (the first argument) in a file called C that uses L (the second argument) as the @@ -765,12 +765,12 @@ automatically build the required files for us: $ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \ create=static dbi:SQLite:myapp.db \ on_connect_do="PRAGMA foreign_keys = ON" - exists "/root/MyApp/script/../lib/MyApp/Model" - exists "/root/MyApp/script/../t" - Dumping manual schema for MyApp::Schema to directory /root/MyApp/script/../lib ... + exists "/home/catalyst/MyApp/script/../lib/MyApp/Model" + exists "/home/catalyst/MyApp/script/../t" + Dumping manual schema for MyApp::Schema to directory /home/catalyst/MyApp/script/../lib ... Schema dump completed. - created "/root/MyApp/script/../lib/MyApp/Model/DB.pm" - created "/root/MyApp/script/../t/model_DB.t" + created "/home/catalyst/MyApp/script/../lib/MyApp/Model/DB.pm" + created "/home/catalyst/MyApp/script/../t/model_DB.t" Please note the '\' above. Depending on your environment, you might be able to cut and paste the text as shown or need to remove the '\' @@ -962,8 +962,8 @@ display something like: [debug] Loaded dispatcher "Catalyst::Dispatcher" [debug] Loaded engine "Catalyst::Engine" - [debug] Found home "/root/MyApp" - [debug] Loaded Config "/root/MyApp/myapp.conf" + [debug] Found home "/home/catalyst/MyApp" + [debug] Loaded Config "/home/catalyst/MyApp/myapp.conf" [debug] Loaded components: .-----------------------------------------------------------------+----------. | Class | Type | diff --git a/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod b/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod index f609941..5cf0952 100644 --- a/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod +++ b/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod @@ -75,9 +75,9 @@ of tool to automate the process. You get less control, but it can be quick and easy. For example, see L, L, and L. -Source code for the tutorial in included in the F directory -of the Tutorial Virtual machine (one subdirectory per chapter). There -are also instructions for downloading the code in +Source code for the tutorial in included in the F +directory of the Tutorial Virtual machine (one subdirectory per +chapter). There are also instructions for downloading the code in L. @@ -966,11 +966,11 @@ the new fields: $ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \ create=static components=TimeStamp dbi:SQLite:myapp.db \ on_connect_do="PRAGMA foreign_keys = ON" - exists "/root/dev/MyApp/script/../lib/MyApp/Model" - exists "/root/dev/MyApp/script/../t" - Dumping manual schema for MyApp::Schema to directory /root/dev/MyApp/script/../lib ... + exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model" + exists "/home/catalyst/dev/MyApp/script/../t" + Dumping manual schema for MyApp::Schema to directory /home/catalyst/dev/MyApp/script/../lib ... Schema dump completed. - exists "/root/dev/MyApp/script/../lib/MyApp/Model/DB.pm" + exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model/DB.pm" Notice that we modified our use of the helper slightly: we told it to include the L in the C line of diff --git a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod index 8692eed..c6f43db 100644 --- a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod @@ -63,7 +63,7 @@ L). This chapter of the tutorial is divided into two main sections: 1) basic, cleartext authentication and 2) hash-based authentication. -Source code for the tutorial in included in the F directory +Source code for the tutorial in included in the F directory of the Tutorial Virtual machine (one subdirectory per chapter). There are also instructions for downloading the code in L. @@ -132,11 +132,11 @@ for us: $ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \ create=static components=TimeStamp dbi:SQLite:myapp.db \ on_connect_do="PRAGMA foreign_keys = ON" - exists "/root/dev/MyApp/script/../lib/MyApp/Model" - exists "/root/dev/MyApp/script/../t" - Dumping manual schema for MyApp::Schema to directory /root/dev/MyApp/script/../lib ... + exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model" + exists "/home/catalyst/dev/MyApp/script/../t" + Dumping manual schema for MyApp::Schema to directory /home/catalyst/dev/MyApp/script/../lib ... Schema dump completed. - exists "/root/dev/MyApp/script/../lib/MyApp/Model/DB.pm" + exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model/DB.pm" $ $ ls lib/MyApp/Schema/Result Author.pm BookAuthor.pm Book.pm Role.pm User.pm UserRole.pm diff --git a/lib/Catalyst/Manual/Tutorial/06_Authorization.pod b/lib/Catalyst/Manual/Tutorial/06_Authorization.pod index 930163c..cb0d599 100644 --- a/lib/Catalyst/Manual/Tutorial/06_Authorization.pod +++ b/lib/Catalyst/Manual/Tutorial/06_Authorization.pod @@ -64,9 +64,9 @@ actions. The first half looks at basic authorization concepts. The second half looks at how moving your authorization code to your model can simplify your code and make things easier to maintain. -Source code for the tutorial in included in the F directory -of the Tutorial Virtual machine (one subdirectory per chapter). There -are also instructions for downloading the code in +Source code for the tutorial in included in the F +directory of the Tutorial Virtual machine (one subdirectory per +chapter). There are also instructions for downloading the code in L. diff --git a/lib/Catalyst/Manual/Tutorial/07_Debugging.pod b/lib/Catalyst/Manual/Tutorial/07_Debugging.pod index 25b56ab..65be2f0 100644 --- a/lib/Catalyst/Manual/Tutorial/07_Debugging.pod +++ b/lib/Catalyst/Manual/Tutorial/07_Debugging.pod @@ -59,6 +59,12 @@ L This chapter of the tutorial takes a brief look at the primary options available for troubleshooting Catalyst applications. +Source code for the tutorial in included in the F +directory of the Tutorial Virtual machine (one subdirectory per +chapter). There are also instructions for downloading the code in +L. + + Note that when it comes to debugging and troubleshooting, there are two camps: @@ -179,7 +185,7 @@ in. Once the breakpoint is encountered in the C method, the console session running the development server will drop to the Perl debugger prompt: - MyApp::Controller::Books::list(/root/MyApp/script/../lib/MyApp/Controller/Books.pm:48): + MyApp::Controller::Books::list(/home/catalyst/MyApp/script/../lib/MyApp/Controller/Books.pm:48): 48: $c->stash->{books} = [$c->model('DB::Book')->all]; DB<1> @@ -191,7 +197,7 @@ C into methods/subroutines): DB<1> n SELECT me.id, me.title, me.rating, me.created, me.updated FROM book me: - MyApp::Controller::Books::list(/root/MyApp/script/../lib/MyApp/Controller/Books.pm:53): + MyApp::Controller::Books::list(/home/catalyst/MyApp/script/../lib/MyApp/Controller/Books.pm:53): 53: $c->stash->{template} = 'books/list.tt2'; DB<1> diff --git a/lib/Catalyst/Manual/Tutorial/08_Testing.pod b/lib/Catalyst/Manual/Tutorial/08_Testing.pod index b90b0e3..30dc008 100644 --- a/lib/Catalyst/Manual/Tutorial/08_Testing.pod +++ b/lib/Catalyst/Manual/Tutorial/08_Testing.pod @@ -63,9 +63,9 @@ ensure that your application is working correctly at the present time, but also provide automated regression testing as you upgrade various pieces of your application over time. -Source code for the tutorial in included in the F directory -of the Tutorial Virtual machine (one subdirectory per chapter). There -are also instructions for downloading the code in +Source code for the tutorial in included in the F +directory of the Tutorial Virtual machine (one subdirectory per +chapter). There are also instructions for downloading the code in L. For an excellent introduction to learning the many benefits of testing diff --git a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod index e7dfaa9..d910d8f 100644 --- a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod +++ b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod @@ -63,9 +63,9 @@ and restore data to/from the database. See L for additional form management options other than L. -Source code for the tutorial in included in the F directory -of the Tutorial Virtual machine (one subdirectory per chapter). There -are also instructions for downloading the code in +Source code for the tutorial in included in the F +directory of the Tutorial Virtual machine (one subdirectory per +chapter). There are also instructions for downloading the code in L.