<div>Thanks you for your answer.</div>
<div>But you're right, the module ..is in its directory. I'm going to check the package declaration.</div>
<div> </div>
<div>I wondered if my team (a java one) could use Catalyst in a production env, but we're not ready. A lot of examples don't work (from the first and the second books we bought). I discovered the last erratas on the apress site : is it possible to get a full (+edit) DBAuth example that works ? It would be nice to remove, for "simple" CRUD examples, the authentication layer and get working code with *stable* conventions, at least for new comers like us ! It is *very* difficult to start Catalyst Tutorials from cpan on other distribs (Debian is ok, but we don't use it here). Catalyst is an elegant one, but hard to master (?!).</div>
<div> </div>
<div>Best regards, </div>
<div>marc<br></div>
<div class="gmail_quote">2010/7/26 Steve <span dir="ltr"><<a href="mailto:steve@matsch.com">steve@matsch.com</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Something IS missing - the 'Addresses.pm' module! Actually, I'd be surprised if it's actually missing, however Perl can't find it for some reason. I would check the 'package' declaration in your module against the error. It could be an issue with plurality, likely because a change was made somewhere along the line in how DBIC handles this. Whatever the case, perl is looking for that module and can't find it.
<div class="im"><br><br><br>On 7/26/2010 8:57 AM, Marc Gamontini wrote:<br></div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">hi,<br>I tried to install an old CRUD Catalyst example (Rockway's AddressBook app, detailed in chapter 3 from his PACKT book) and I got errors. I've fully fonctional examples (from the Definitive Guide), like SneayCat - thank you, it's an excellent one ! - on the same machine, a CentOS 5.5 config with Perl 5.8.8, Catalyst 5.80024 and modules, among them :<br>
Catalyst::Devel is up to date (1.28)<br>DBIx::Class is up to date (0.08123).<br>Catalyst::Model::DBIC::Schema is up to date (0.43)<br>Catalyst::Devel is up to date (1.28).<br>Catalyst::Plugin::Authentication is up to date (0.10016).<br>
Catalyst::Plugin::Authorization::Roles is up to date (0.08).<br>Catalyst::Plugin::ConfigLoader is up to date (0.28).<br>Catalyst::Plugin::Session is up to date (0.30).<br>Catalyst::Plugin::Session::State::Cookie is up to date (0.17).<br>
Catalyst::Plugin::Session::Store::FastMmap is up to date (0.13).<br>Catalyst::Plugin::StackTrace is up to date (0.11).<br>Catalyst::Plugin::Static::Simple is up to date (0.29).<br>Class::MOP is up to date (1.04)<br>I applied changes detailed here (/AddressBook::Schema::AddressDB::Result/):<br>
<a href="http://wiki.catalystframework.org/wiki/thebookerrata" target="_blank">http://wiki.catalystframework.org/wiki/thebookerrata</a><br><a href="http://lists.scsys.co.uk/pipermail/catalyst/2009-April/021929.html" target="_blank">http://lists.scsys.co.uk/pipermail/catalyst/2009-April/021929.html</a><br>
It doesn't work for me and i'm lost : I don't understand why the component can't be instantiated. Is something missing ?<br>Thank you in advance for your help !<br>Marc<br>Report :<br></div>#script/<a href="http://addressbook_server.pl/" target="_blank">addressbook_server.pl</a> <<a href="http://addressbook_server.pl/" target="_blank">http://addressbook_server.pl</a>>
<div>
<div></div>
<div class="h5"><br>Couldn't load class (AddressBook) because: Couldn't instantiate component "AddressBook::Model::AddressDB", "Couldn't load class (AddressBook::Schema::AddressDB) because: DBIx::Class::Schema::throw_exception(): DBIx::Class::Row::throw_exception(): Can't locate AddressBook/Schema/AddressDB/Result/Addresses.pm in @INC (@INC contains: /root/AddressBook/script/../lib /root/perl5/lib/perl5/i386-linux-thread-multi /root/perl5/lib/perl5 /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /root/perl5/lib/perl5/Class/C3/Componentised.pm line 135.<br>
Compilation failed in require at /root/perl5/lib/perl5/Class/C3/Componentised.pm line 135.<br>Compilation failed in require at /root/perl5/lib/perl5/Class/C3/Componentised.pm line 135.<br>Compilation failed in require at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 114.<br>
at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 120<br> Class::MOP::__ANON__('DBIx::Class::Schema::throw_exception(): DBIx::Class::Row::thr...') called at /root/perl5/lib/perl5/Try/Tiny.pm line 98<br>
Try::Tiny::try('CODE(0xaefb290)', 'Try::Tiny::Catch=REF(0xaeb31b0)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 125<br> Class::MOP::load_first_existing_class('AddressBook::Schema::AddressDB') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 137<br>
Class::MOP::load_class('AddressBook::Schema::AddressDB') called at /root/perl5/lib/perl5/Catalyst/Model/DBIC/Schema/Types.pm line 21<br> Catalyst::Model::DBIC::Schema::Types::__ANON__('AddressBook::Schema::AddressDB') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/TypeCoercion.pm line 63<br>
Moose::Meta::TypeCoercion::__ANON__('AddressBook::Schema::AddressDB') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/TypeCoercion.pm line 97<br> Moose::Meta::TypeCoercion::coerce('Moose::Meta::TypeCoercion=HASH(0xae2b0e4)', 'AddressBook::Schema::AddressDB') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/TypeConstraint.pm line 90<br>
Moose::Meta::TypeConstraint::coerce('Moose::Meta::TypeConstraint=HASH(0xae6f4dc)', 'AddressBook::Schema::AddressDB') called at /root/perl5/lib/perl5/MooseX/Types/TypeDecorator.pm line 206<br> eval {...} called at /root/perl5/lib/perl5/MooseX/Types/TypeDecorator.pm line 205<br>
MooseX::Types::TypeDecorator::AUTOLOAD('MooseX::Types::TypeDecorator=HASH(0xadcaef0)', 'AddressBook::Schema::AddressDB') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Attribute.pm line 742<br>
Moose::Meta::Attribute::_coerce_and_verify('Moose::Meta::Attribute=HASH(0xaeab4e0)', 'AddressBook::Schema::AddressDB', 'AddressBook::Model::AddressDB=HASH(0xaf55448)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Attribute.pm line 398<br>
Moose::Meta::Attribute::initialize_instance_slot('Moose::Meta::Attribute=HASH(0xaeab4e0)', 'Moose::Meta::Instance=HASH(0xaefb254)', 'AddressBook::Model::AddressDB=HASH(0xaf55448)', 'HASH(0xaf55304)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Class.pm line 567<br>
Class::MOP::Class::_construct_instance('Moose::Meta::Class=HASH(0xadd3528)', 'HASH(0xaf55304)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Class.pm line 540<br> Class::MOP::Class::new_object('Moose::Meta::Class=HASH(0xadd3528)', 'HASH(0xaf55304)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Class.pm line 256<br>
Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0xadd3528)', 'HASH(0xaf55304)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Object.pm line 25<br> Moose::Object::new('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xae9ed8c)') called at generated method (unknown origin) line 3<br>
Catalyst::Model::DBIC::Schema::new('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xae9ed8c)') called at /root/perl5/lib/perl5/MooseX/Traits/Pluggable.pm line 131<br> MooseX::Traits::Pluggable::new_with_traits('AddressBook::Model::AddressDB', 'AddressBook') called at /root/perl5/lib/perl5/CatalystX/Component/Traits.pm line 145<br>
CatalystX::Component::Traits::COMPONENT('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xaf553a0)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 48<br>
Class::MOP::Method::Wrapped::__ANON__('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xaf553a0)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 89<br>
Catalyst::Model::DBIC::Schema::COMPONENT('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xaf553a0)') called at /root/perl5/lib/perl5/Catalyst.pm line 2502<br> eval {...} called at /root/perl5/lib/perl5/Catalyst.pm line 2502<br>
Catalyst::setup_component('AddressBook', 'AddressBook::Model::AddressDB') called at /root/perl5/lib/perl5/Catalyst.pm line 2416<br> Catalyst::setup_components('AddressBook') called at /root/perl5/lib/perl5/Catalyst.pm line 1142<br>
Catalyst::setup('AddressBook') called at /root/AddressBook/script/../lib/AddressBook.pm line 42<br> require AddressBook.pm called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 114<br>
Class::MOP::__ANON__() called at /root/perl5/lib/perl5/Try/Tiny.pm line 71<br> eval {...} called at /root/perl5/lib/perl5/Try/Tiny.pm line 67<br> Try::Tiny::try('CODE(0x9f9cd50)', 'Try::Tiny::Catch=REF(0xa74b390)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 125<br>
Class::MOP::load_first_existing_class('AddressBook') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 137<br> Class::MOP::load_class('AddressBook') called at /root/perl5/lib/perl5/Catalyst/ScriptRole.pm line 61<br>
Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/Catalyst/Script/Server.pm line 181<br> Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 48<br>
Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 89<br> Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/Catalyst/ScriptRunner.pm line 20<br>
</div></div> Catalyst::ScriptRunner::run('Catalyst::ScriptRunner', 'AddressBook', 'Server') called at script/<a href="http://addressbook_server.pl/" target="_blank">addressbook_server.pl</a> <<a href="http://addressbook_server.pl/" target="_blank">http://addressbook_server.pl</a>> line 8
<div>
<div></div>
<div class="h5"><br> at /root/perl5/lib/perl5/MooseX/Types/TypeDecorator.pm line 208<br> MooseX::Types::TypeDecorator::AUTOLOAD('MooseX::Types::TypeDecorator=HASH(0xadcaef0)', 'AddressBook::Schema::AddressDB') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Attribute.pm line 742<br>
Moose::Meta::Attribute::_coerce_and_verify('Moose::Meta::Attribute=HASH(0xaeab4e0)', 'AddressBook::Schema::AddressDB', 'AddressBook::Model::AddressDB=HASH(0xaf55448)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Attribute.pm line 398<br>
Moose::Meta::Attribute::initialize_instance_slot('Moose::Meta::Attribute=HASH(0xaeab4e0)', 'Moose::Meta::Instance=HASH(0xaefb254)', 'AddressBook::Model::AddressDB=HASH(0xaf55448)', 'HASH(0xaf55304)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Class.pm line 567<br>
Class::MOP::Class::_construct_instance('Moose::Meta::Class=HASH(0xadd3528)', 'HASH(0xaf55304)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Class.pm line 540<br> Class::MOP::Class::new_object('Moose::Meta::Class=HASH(0xadd3528)', 'HASH(0xaf55304)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Class.pm line 256<br>
Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0xadd3528)', 'HASH(0xaf55304)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Object.pm line 25<br> Moose::Object::new('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xae9ed8c)') called at generated method (unknown origin) line 3<br>
Catalyst::Model::DBIC::Schema::new('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xae9ed8c)') called at /root/perl5/lib/perl5/MooseX/Traits/Pluggable.pm line 131<br> MooseX::Traits::Pluggable::new_with_traits('AddressBook::Model::AddressDB', 'AddressBook') called at /root/perl5/lib/perl5/CatalystX/Component/Traits.pm line 145<br>
CatalystX::Component::Traits::COMPONENT('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xaf553a0)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 48<br>
Class::MOP::Method::Wrapped::__ANON__('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xaf553a0)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 89<br>
Catalyst::Model::DBIC::Schema::COMPONENT('AddressBook::Model::AddressDB', 'AddressBook', 'HASH(0xaf553a0)') called at /root/perl5/lib/perl5/Catalyst.pm line 2502<br> eval {...} called at /root/perl5/lib/perl5/Catalyst.pm line 2502<br>
Catalyst::setup_component('AddressBook', 'AddressBook::Model::AddressDB') called at /root/perl5/lib/perl5/Catalyst.pm line 2416<br> Catalyst::setup_components('AddressBook') called at /root/perl5/lib/perl5/Catalyst.pm line 1142<br>
Catalyst::setup('AddressBook') called at /root/AddressBook/script/../lib/AddressBook.pm line 42<br> require AddressBook.pm called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 114<br>
Class::MOP::__ANON__() called at /root/perl5/lib/perl5/Try/Tiny.pm line 71<br> eval {...} called at /root/perl5/lib/perl5/Try/Tiny.pm line 67<br> Try::Tiny::try('CODE(0x9f9cd50)', 'Try::Tiny::Catch=REF(0xa74b390)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 125<br>
Class::MOP::load_first_existing_class('AddressBook') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 137<br> Class::MOP::load_class('AddressBook') called at /root/perl5/lib/perl5/Catalyst/ScriptRole.pm line 61<br>
Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/Catalyst/Script/Server.pm line 181<br> Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 48<br>
Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 89<br> Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/Catalyst/ScriptRunner.pm line 20<br>
</div></div> Catalyst::ScriptRunner::run('Catalyst::ScriptRunner', 'AddressBook', 'Server') called at script/<a href="http://addressbook_server.pl/" target="_blank">addressbook_server.pl</a> <<a href="http://addressbook_server.pl/" target="_blank">http://addressbook_server.pl</a>> line 8"Compilation failed in require at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 114.
<div class="im"><br> at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 120<br> Class::MOP::__ANON__('Couldn\'t instantiate component "AddressBook::Model::AddressD...') called at /root/perl5/lib/perl5/Try/Tiny.pm line 98<br>
Try::Tiny::try('CODE(0x9f9cd50)', 'Try::Tiny::Catch=REF(0xa74b390)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 125<br> Class::MOP::load_first_existing_class('AddressBook') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 137<br>
Class::MOP::load_class('AddressBook') called at /root/perl5/lib/perl5/Catalyst/ScriptRole.pm line 61<br> Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/Catalyst/Script/Server.pm line 181<br>
Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 48<br> Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 89<br>
Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)') called at /root/perl5/lib/perl5/Catalyst/ScriptRunner.pm line 20<br></div> Catalyst::ScriptRunner::run('Catalyst::ScriptRunner', 'AddressBook', 'Server') called at script/<a href="http://addressbook_server.pl/" target="_blank">addressbook_server.pl</a> <<a href="http://addressbook_server.pl/" target="_blank">http://addressbook_server.pl</a>> line 8<br>
<br><br>_______________________________________________<br>List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote><br>_______________________________________________<br>List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
</blockquote></div><br>