remove trailing whitespace
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Tutorial / 01_Intro.pod
index 976c12d..42e53e4 100644 (file)
@@ -115,7 +115,7 @@ Subjects covered by the tutorial include:
 
 =over 4
 
-=item * 
+=item *
 
 A simple application that lists and adds books.
 
@@ -125,7 +125,7 @@ The use of L<DBIx::Class> (DBIC) for the model (including
 some of the more advanced techniques you will probably want to use in
 your applications).
 
-=item * 
+=item *
 
 How to write CRUD (Create, Read, Update, and Delete) operations in
 Catalyst.
@@ -134,25 +134,25 @@ Catalyst.
 
 Authentication ("auth").
 
-=item * 
+=item *
 
 Role-based authorization ("authz").
 
-=item * 
+=item *
 
 Attempts to provide an example showing current (5.9) Catalyst
 practices.
 
-=item * 
+=item *
 
 The use of Template Toolkit (TT).
 
-=item * 
+=item *
 
 Useful techniques for troubleshooting and debugging Catalyst
 applications.
 
-=item * 
+=item *
 
 The use of SQLite as a database (with code also provided for MySQL and
 PostgreSQL).  (Note: Because we make use of the DBIx::Class Object
@@ -160,7 +160,7 @@ Relational Mapping [ORM] layer, out our application will be database
 agnostic and can easily be used by any of the databases supported by
 DBIx::Class.)
 
-=item * 
+=item *
 
 The use of L<HTML::FormFu> or L<HTML::FormHandler>
 for automated form processing and validation.
@@ -203,7 +203,7 @@ current directory), but we will keep it short and just use "C<$>".
 
 =over 4
 
-=item 1 
+=item 1
 
 Download a Tutorial Virtual Machine image from
 L<http://cattut.shadowcat.co.uk/>
@@ -244,7 +244,7 @@ machine.  You should get output along the lines of:
     ...
 
 You want the IP address on the second line below the C<eth0> interface.
-The image it design to automatically use a DHCP-assigned address.
+The image is designed to automatically use a DHCP-assigned address.
 
 
 Try to ping this IP address from your "host machine" (main desktop):
@@ -280,7 +280,7 @@ IP address found in the previous step.  You should get a login prompt
 with the same username and password as we used in Step 4: B<catalyst> /
 B<catalyst>
 
-    catalyst login: catalyst 
+    catalyst login: catalyst
     Password: catalyst
     ...
     catalyst@catalyst:~$
@@ -293,7 +293,7 @@ Chapter 3 included with the Tutorial Virtual Machine and start the
 Catalyst Development Server:
 
     $ cd Final/Chapter03/MyApp
-    $ perl scripts/myapp_server
+    $ perl script/myapp_server.pl
 
 =item 8
 
@@ -326,29 +326,55 @@ In order to reduce the size of the download, Emacs is not pre-installed.
 Since people obviously have very strong opinions about which editor is
 best, :-) fortunately it's very easy to install Emacs:
 
-    $ aptitude update
-    $ aptitude install emacs
+    $ sudo aptitude update
+    $ sudo aptitude install emacs
 
 In general, it is expected that people will
 boot up the Tutorial VM on their main desktop (the "host machine" using
 the terminology above) and then use that main desktop machine to SSH and
 web browse into the "guest VM" as they work through the tutorial.  If
 you wish to install X Windows (or any other packages), just use the
-C<aptitude> (or C<apt-get>) Debian commands.  For example, to install
-X Windows with the Gnome desktop manager, you can do:
+C<aptitude> (or C<apt-get>) Debian commands.
 
-    $ aptitude update
-    $ aptitude install gnome iceweasel
+For example, to install X Windows with Fluxbox (a lightweight
+WindowManager -- it is great for things like this tutorial since it's
+about 1/10th the size of other common X Windows environments), you can
+do:
 
-Or, if you prefer KDE:
+    $ sudo aptitude update
+    $ sudo aptitude install xorg fluxbox iceweasel
 
-    $ aptitude update
-    $ aptitude install kde iceweasel
-
-You can then start X Windows with:
+And then start X Windows from the B<VM Console> with this command:
 
     $ startx
 
+Note that if you want to start Fluxbox from an SSH session, you can use
+the C<sudo dpkg-reconfigure x11-common> and select "anybody" from the
+menu.  Otherwise, you will need to be on the actual "VM console" to
+start it.
+
+If you have a preference for the Gnome desktop environment, you can do:
+
+    $ sudo aptitude update
+    $ sudo aptitude install gnome iceweasel
+    $
+    $ # You can reboot or start with 'startx', we will just reboot here
+    $ reboot
+
+For KDE, just substitute the package name "C<kde>" for "C<gnome>" above.
+
+    $ sudo aptitude install kde iceweasel
+
+Note that C<iceweasel> is basically used to install Firefox on Debian
+boxes.  You can start it under X Windows with either the C<firefox>
+command or the C<iceweasel> command (or use the menus).  You can get
+more information on Iceweasel at L<http://wiki.debian.org/Iceweasel>.
+
+Also, you might need to add more memory to your virtual machine if you
+want to run X Windows (or other tools that might require additional
+memory).  Consult the documentation of your virtualization software
+for instructions on how to do this (it's usually pretty simple).
+
 
 =back
 
@@ -359,7 +385,7 @@ that the Perl modules are run from ~/perl5 (in this case,
 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
+servers.  (The "relocatable Perl" feature can also be used to run
 both the modules B<and> Perl itself from your home directory [or any
 other directory you chose]).
 
@@ -412,11 +438,16 @@ other machine (including the "host machine") into the VM.  Some virtual
 machine host environments let you configure a "static NAT" or "port
 forwarding" to reach the guest OS, but others omit this functionality.
 
+Note: NAT mode can work fine if you install X Windows and do the whole
+tutorial locally on the actual VM vs. using SSH and a web browser from
+your host machine.
+
 "Local host only" mode let's the guest VM and the host machine talk on a
 "private subnet" that other devices in your network cannot reach.  This
 can work as long as you don't need to go from the VM to the Internet
 (for example, to install other Debian packages).
 
+
 Consult the documentation on your virtual machine host environment for
 help configuring the options above.  Here are some links that might
 help:
@@ -425,7 +456,7 @@ help:
 
 =item *
 
-L<http://vmfaq.com/entry/34/>
+L<http://vmfaq.com/index.php?View=entry&EntryID=34>
 
 =item *
 
@@ -450,11 +481,11 @@ v5.80020 might show up as 5.8002):
 
 =over 4
 
-=item * 
+=item *
 
 Debian 6 (Squeeze)
 
-=item * 
+=item *
 
 Catalyst v5.90002
 
@@ -462,7 +493,7 @@ Catalyst v5.90002
 
 Catalyst::Devel v1.34
 
-=item * 
+=item *
 
 DBIx::Class v0.08195
 
@@ -479,7 +510,7 @@ Template Toolkit v2.22
 
 HTML::FormFu -- v0.09004
 
-=item * 
+=item *
 
 B<NOTE:> You can check the versions you have installed with the
 following command (note the slash before the space):
@@ -498,7 +529,7 @@ or:
 
     perl -MCatalyst::Devel -e 'print "$Catalyst::Devel::VERSION\n";'
 
-=item * 
+=item *
 
 This tutorial will show URLs in the format of C<http://localhost:3000>,
 but if you are running your web browser from outside the Tutorial
@@ -507,8 +538,8 @@ for the C<localhost> in the URLs (again, you can get the IP address for
 eth0 from the C<ifconfig> command).  For example, if your VM has an
 IP address of 192.168.0.12, you will want to use a base URL of
 C<http://192.168.0.12:3000>.  Note that the development server
-defaults to port 3000 (you can change with with the "-p" option on the
-command line.
+defaults to port 3000 (you can change with the "-p" option on the
+command line).
 
 B<Please Note:> Depending on the web browser you are using, you might
 need to hit C<Shift+Reload> or C<Ctrl+Reload> to pull a fresh page when