Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Catalyst by the Book- The Train Wreck Continues

by roho (Chancellor)
on Mar 19, 2010 at 17:29 UTC ( #829664=note: print w/replies, xml ) Need Help??


in reply to Catalyst by the Book- The Train Wreck Continues

I started with a clean slate, just to verify that Catalyst is generating runnable code out of the box (and it is), as in the following steps:
  • C:\ catalyst.pl AddressBook
  • C:\ cd AddressBook
  • C:\AddressBook\ sqlite3 database < create_database.sql
  • C:\AddressBook\ (Verified SQLite database created properly)
  • C:\AddressBook\ perl script\addressbook_create.pl view HTML TTSite
  • C:\AddressBook\ perl script\addressbook_create.pl model AddressDB DBIC::Schema AddressBook::Schema::AddressDB create=static dbi:SQLite:database
  • C:\AddressBook\ perl script\addressbook_server.pl
  • C:\AddressBook\ "C:\Program Files (x86)\Internet Explorer\iexplore.exe" http://localhost:3000/

The default Catalyst page is displayed in the web browser, so it must be something in the book's modification instructions that's messing things up, and right now I have neither the time nor the patience to debug the book while trying to learn Catalyst. It looks like it's time for a new learning source. (sigh!)

Thanks to all for your comments and suggestions.

"Its not how hard you work, its how much you get done."

  • Comment on Re: Catalyst by the Book- The Train Wreck Continues

Replies are listed 'Best First'.
Re^2: Catalyst by the Book- The Train Wreck Continues
by roho (Chancellor) on Mar 19, 2010 at 21:22 UTC
    This was bugging me, so I created a fresh Catalyst skeleton and tested after applying each mod in the book. The problem was simply errors in the text of the book, not Catalyst version differences, etc. An errate list for this book is definitely in order if people are to use it effectively.

    FWIW, the invalid text causing all my module location error messages is on p. 22 of the book, as shown in the "before" and "after" lines below:

    Before:
    __PACKAGE__->has_many(
    addresses => 'AddressBook::Schema::AddressDB::Addresses',

    After:
    __PACKAGE__->has_many(
    addresses => 'AddressBook::Schema::AddressDB::Result::Address',



    Before:
    __PACKAGE__->belongs_to(
    person => 'AddressBook::Schema::AddressDB::People',

    After:
    __PACKAGE__->belongs_to(
    person => 'AddressBook::Schema::AddressDB::Result::People',

    "Its not how hard you work, its how much you get done."

      I stand corrected. This problem _is_ related to versions. After locating the book's errata at http://wiki.catalystframework.org/wiki/thebookerrata, one of the entries pointed out that version 0.22 and later of "Catalyst::Model::DBIC::Schema" add '::Result' to the generated classes. I wish I had found this errata page earlier. It would have saved much time and frustration.

      "Its not how hard you work, its how much you get done."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://829664]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2020-02-28 19:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (127 votes). Check out past polls.

    Notices?