<div><div id="contentDiv" style="position:relative;font-size:14px;height:auto;padding:15px 15px 10px 15px;z-index:1;zoom:1;line-height:1.7;" class="body"><div id="mailContentContainer" style="height: auto; min-height: 100px; font-size: 14px; padding: 0px; font-family: 'lucida Grande',Verdana; margin-right: 170px;"><div>Everyone:<br>
&nbsp; &nbsp; I am learning catalyst from the book &lt;Catalyst 5.8 the perl MVC framework&gt;. I have finished the two former chapters.<br>
&nbsp; &nbsp; When I study the third chapter &lt;Building a Real Application&gt;, I
 can't run the web application. What I have finished as follows:<br>
&nbsp; &nbsp; 1.&nbsp; $ catalyst.pl AddressBook<br>
&nbsp; &nbsp; 2.&nbsp; $ cpan Catalyst::Controller::FormBuilder Catalyst::Controller::BindLex<br>
&nbsp; &nbsp; 3.&nbsp; $ perl script/addressbook_create.pl view HTML TTSite<br>
&nbsp; &nbsp; 4.&nbsp; create a sqlite3 database; the database have two tables : people
 and addresses. The database's directory is ~/addressbook/tmp/<br>
&nbsp; &nbsp; 5.&nbsp; $ perl script/addressbook_create.pl model AddressDB DBIC::Schema
 AddressBook::Schema::AddressDB create=static dbi:SQLite:database<br>
&nbsp; &nbsp; 6.&nbsp; The book mentions &lt;At this stage, you can do a quick sanity 
check and see if the contents of the file lib/AddressBook/Schema/<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddressDB.pm have the following:&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ---------------------------------------------<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; __PACKAGE__-&gt;config(<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; schema_class =&gt; 'AddressBook::Schema::AddressDB',<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; connect_info =&gt; ['dbi:SQLite:database',],<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ---------------------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; I think, maybe I misunderstand the above sentences. The file 
AddressDB.pm have no such code. Add or no, the error still.<br>
&nbsp; &nbsp; 7.&nbsp; others steps as books ......<br>
<br>
<br>
&nbsp; &nbsp; I run the command : script/addressbook_server.pl -r -d; I get the follows:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; ------------------------------------------------------<br>
Couldn't instantiate component "AddressBook::Model::AddressDB", 
"DBIx::Class::Schema::throw_exception(): 
DBIx::Class::Row::throw_exception(): Can't locate 
AddressBook/Schema/AddressDB/Result/People.pm in @INC (@INC contains: 
/home/hengaini/Catalyst_201209/AddressBook/script/../lib 
/home/hengaini/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int 
/home/hengaini/perl5/lib/perl5 /etc/perl /usr/local/lib/perl/5.14.2 
/usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 
/usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at 
/home/hengaini/perl5/lib/perl5/Class/C3/Componentised.pm line 150. at 
/home/hengaini/perl5/lib/perl5/Class/C3/Componentised.pm line 155<br>
Compilation failed in require at 
/home/hengaini/perl5/lib/perl5/Class/C3/Componentised.pm line 150. at 
/home/hengaini/perl5/lib/perl5/Class/C3/Componentised.pm line 155<br>
Compilation failed in require at /home/hengaini/perl5/lib/perl5/Module/Runtime.pm line 317.<br>
 at /usr/lib/perl5/Moose/Meta/TypeCoercion.pm line 68<br>
 at /usr/share/perl5/MooseX/Types/TypeDecorator.pm line 157<br>
&nbsp; &nbsp; 
MooseX::Types::TypeDecorator::AUTOLOAD('MooseX::Types::TypeDecorator=HASH(0xa2dbed8)',
 'AddressBook::Schema::AddressDB') called at 
/usr/lib/perl5/Moose/Meta/Attribute.pm line 1259<br>
&nbsp; &nbsp; 
Moose::Meta::Attribute::_coerce_and_verify('Moose::Meta::Attribute=HASH(0xa3c5e6c)',
 'AddressBook::Schema::AddressDB', 
'AddressBook::Model::AddressDB=HASH(0xa4741ac)') called at 
/usr/lib/perl5/Moose/Meta/Attribute.pm line 531<br>
&nbsp; &nbsp; 
Moose::Meta::Attribute::initialize_instance_slot('Moose::Meta::Attribute=HASH(0xa3c5e6c)',
 'Moose::Meta::Instance=HASH(0xa474260)', 
'AddressBook::Model::AddressDB=HASH(0xa4741ac)', 'HASH(0xa473ea0)') 
called at /usr/lib/perl5/Class/MOP/Class.pm line 525<br>
&nbsp; &nbsp; 
Class::MOP::Class::_construct_instance('Moose::Meta::Class=HASH(0xa2e592c)',
 'HASH(0xa473ea0)') called at /usr/lib/perl5/Class/MOP/Class.pm line 498<br>
&nbsp; &nbsp; Class::MOP::Class::new_object('Moose::Meta::Class=HASH(0xa2e592c)', 
'HASH(0xa473ea0)') called at /usr/lib/perl5/Moose/Meta/Class.pm line 274<br>
&nbsp; &nbsp; Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0xa2e592c)',
 'HASH(0xa473ea0)') called at /usr/lib/perl5/Moose/Object.pm line 28<br>
&nbsp; &nbsp; Moose::Object::new('AddressBook::Model::AddressDB', 'AddressBook', 
'HASH(0xa3b7ba4)') called at constructor 
Catalyst::Model::DBIC::Schema::new (defined at 
/home/hengaini/perl5/lib/perl5/Catalyst/Model/DBIC/Schema.pm line 586) 
line 4<br>
&nbsp; &nbsp; Catalyst::Model::DBIC::Schema::new('AddressBook::Model::AddressDB', 
'AddressBook', 'HASH(0xa3b7ba4)') called at 
/home/hengaini/perl5/lib/perl5/MooseX/Traits/Pluggable.pm line 139<br>
&nbsp; &nbsp; 
MooseX::Traits::Pluggable::_build_instance_with_traits('AddressBook::Model::AddressDB',
 'AddressBook::Model::AddressDB', 'AddressBook') called at 
/home/hengaini/perl5/lib/perl5/MooseX/Traits/Pluggable.pm line 97<br>
&nbsp; &nbsp; 
MooseX::Traits::Pluggable::new_with_traits('AddressBook::Model::AddressDB',
 'AddressBook', 'HASH(0xa473c34)') called at 
/home/hengaini/perl5/lib/perl5/CatalystX/Component/Traits.pm line 145<br>
&nbsp; &nbsp; 
CatalystX::Component::Traits::COMPONENT('AddressBook::Model::AddressDB',
 'AddressBook', 'HASH(0xa473d9c)') called at 
/usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 50<br>
&nbsp; &nbsp; 
Class::MOP::Method::Wrapped::__ANON__('AddressBook::Model::AddressDB', 
'AddressBook', 'HASH(0xa473d9c)') called at 
/usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 91<br>
&nbsp; &nbsp; 
Catalyst::Model::DBIC::Schema::COMPONENT('AddressBook::Model::AddressDB',
 'AddressBook', 'HASH(0xa473d9c)') called at 
/home/hengaini/perl5/lib/perl5/Catalyst.pm line 2588<br>
&nbsp; &nbsp; eval {...} called at /home/hengaini/perl5/lib/perl5/Catalyst.pm line 2588<br>
&nbsp; &nbsp; Catalyst::setup_component('AddressBook', 
'AddressBook::Model::AddressDB') called at 
/home/hengaini/perl5/lib/perl5/Catalyst.pm line 2515<br>
&nbsp; &nbsp; Catalyst::setup_components('AddressBook') called at /home/hengaini/perl5/lib/perl5/Catalyst.pm line 1166<br>
&nbsp; &nbsp; Catalyst::setup('AddressBook') called at /home/hengaini/Catalyst_201209/AddressBook/script/../lib/AddressBook.pm line 46<br>
&nbsp; &nbsp; require AddressBook.pm called at /home/hengaini/perl5/lib/perl5/Module/Runtime.pm line 317<br>
&nbsp; &nbsp; Module::Runtime::require_module('AddressBook') called at /usr/share/perl5/Class/Load.pm line 208<br>
&nbsp; &nbsp; Class::Load::__ANON__() called at /usr/share/perl5/Try/Tiny.pm line 71<br>
&nbsp; &nbsp; eval {...} called at /usr/share/perl5/Try/Tiny.pm line 67<br>
&nbsp; &nbsp; Try::Tiny::try('CODE(0x9e03ff8)', 'Try::Tiny::Catch=REF(0x9ecf644)') called at /usr/share/perl5/Class/Load.pm line 214<br>
&nbsp; &nbsp; Class::Load::try_load_class('AddressBook', undef) called at /usr/share/perl5/Class/Load.pm line 73<br>
&nbsp; &nbsp; Class::Load::load_class('AddressBook') called at /home/hengaini/perl5/lib/perl5/Catalyst/ScriptRole.pm line 83<br>
&nbsp; &nbsp; 
Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0x944abb0)')
 called at /home/hengaini/perl5/lib/perl5/Catalyst/Script/Server.pm line
 177<br>
&nbsp; &nbsp; Catalyst::Script::Server::__ANON__() called at /home/hengaini/perl5/lib/perl5/Catalyst/Restarter/Forking.pm line 20<br>
&nbsp; &nbsp; 
Catalyst::Restarter::Forking::_fork_and_start('Catalyst::Restarter::Forking=HASH(0x9ec865c)')
 called at /home/hengaini/perl5/lib/perl5/Catalyst/Restarter.pm line 89<br>
&nbsp; &nbsp; 
Catalyst::Restarter::run_and_watch('Catalyst::Restarter::Forking=HASH(0x9ec865c)')
 called at /home/hengaini/perl5/lib/perl5/Catalyst/Script/Server.pm line
 226<br>
&nbsp; &nbsp; 
Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x944abb0)')
 called at /home/hengaini/perl5/lib/perl5/Catalyst/ScriptRunner.pm line 
50<br>
&nbsp; &nbsp; Catalyst::ScriptRunner::run('Catalyst::ScriptRunner', 'AddressBook',
 'Server') called at script/addressbook_server.pl line 8"Compilation 
failed in require at /home/hengaini/perl5/lib/perl5/Module/Runtime.pm 
line 317.<br>
 at /home/hengaini/perl5/lib/perl5/Catalyst/Script/Server.pm line 177<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; ------------------------------------------------------<br>
<br>
&nbsp;&nbsp; &nbsp; My questions:<br>
&nbsp;&nbsp; &nbsp; 1. I compare the second chapter code and the third chapter code, they are as same:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; --------------------------------------------------------<br>
$ perl script/myapp_create.pl model TestDatabase DBIC::Schema MyApp::<br>
Schema::TestDatabase create=dynamic dbi:SQLite:tmp/database<br>
$ perl script/addressbook_create.pl model AddressDB DBIC::Schema<br>
AddressBook::Schema::AddressDB create=static dbi:SQLite:database<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; ---------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; what's my mistake. How to solve this problem.<br>
<br>
&nbsp;&nbsp; &nbsp; 2. I got a computer bachelor degree in China. In fact, I am a 
newbie of Perl and Catalyst. How to study Perl and Catalyst.&nbsp; <br>
<br>
&nbsp;&nbsp; &nbsp; Respect your replay.<br>
&nbsp;&nbsp; &nbsp; Thanks!<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 Thai Heng from China<br>
<br>
<br>
<br>
<br>
</div>    </div></div></div>