[Catalyst] Newbie needs help with tutorial
catalyst.20.chsg at spamgourmet.com
catalyst.20.chsg at spamgourmet.com
Fri Nov 3 03:33:59 GMT 2006
I'm also returning to Perl programming after (joyfully) finding an
MVC that's based on a language I've already learned.
However, in going through the tutorial, I know I've screwed up
something, somewhere. When I try to run the server, here's what I get:
$ script/myapp_server.pl
Couldn't instantiate component "MyApp::Model::MyAppDB", "Cannot load
schema class 'MyAppDB': syntax error at (eval 99) line 1, near
"require DBIx::Class:"
...propagated at /opt/local/lib/perl5/5.8.8/base.pm line 85.
BEGIN failed--compilation aborted at /Volumes/SHARED/Projects/
Learning/Catalyst/MyApp/script/../lib/MyAppDB.pm line 10.
Compilation failed in require at /opt/local/lib/perl5/site_perl/5.8.8/
Catalyst/Model/DBIC/Schema.pm line 272.
at script/myapp_server.pl line 53" at script/myapp_server.pl line 53
Compilation failed in require at script/myapp_server.pl line 53.
The part that confuses me is "syntax error at (eval 99) line 1".
What's "(eval 99)" mean? And if anyone has a clue on what's wrong
(or even just what files to look at and for what), I'd be grateful.
Thanks,
Conan.
On Nov 1, 2006, at 3:36 PM, JT Justman - jt at signless.com wrote:
> Richard Wolfe wrote:
>> Hello all-
>>
>> I've been writing (bad) Perl/CGI scripts for years, but am just now
>> trying to get my head around Catalyst (and MVC in general). I
>> managed to
>> get Catalyst installed on my little Linux box here, and I'm busily
>> working my way through Catalyst::Manual::Tutorial.
>>
>> In working my way through Part 2 (Catalyst Basics) of the tutorial, I
>> create my new Catalyst project and start up the server and can
>> browse to
>> it no problem. But after I step through all the other tasks on this
>> portion of the tutorial (create a database, MyAppDB.pm, the "result
>> source" files, the controller, etc.) the server throws an error
>> when I
>> try to start it:
>>
>> [rwolfe at coyote MyApp]$ script/myapp_server.pl
>> Couldn't instantiate component "MyApp::Model::MyAppDB", "Cannot load
>> schema class 'MyAppDB': Recursive inheritance detected while
>> looking for
>> method 'can' in package 'DBIx::Class::Componentised' at
>> /usr/lib/perl5/site_perl/5.8.8/DBIx/Class/Componentised.pm line 76.
>> Compilation failed in require at
>> /usr/lib/perl5/site_perl/5.8.8/Catalyst/Model/DBIC/Schema.pm line
>> 272.
>> at script/myapp_server.pl line 53" at script/myapp_server.pl line 53
>> Compilation failed in require at script/myapp_server.pl line 53.
>>
>
> Well, it sort of looks to my untrained eye like some component of your
> schema is loading either the main Schema class or something else.
>
> In your MyAppDB.pm file, what do you have in load_classes? If it's
> blank, IIRC it will automatically load all the modules in the MyAppDB
> directory. Perhaps you have something in there you didn't mean to
> have,
> such as a copy of MyAppDB.pm? Look carefully at each of those classes,
> and try disabling them one at a time.
>
> It may help to check out a copy of the finished app from svn to have
> something to compare to.
>
> JT
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/
> catalyst at lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
More information about the Catalyst
mailing list