[Catalyst] command in Catalyst tute part 4 for generating schema files (static creation) using DBIx::Class::TimeStamp needs tobeupdated

Octavian Râsnita orasnita at gmail.com
Sat Mar 21 22:16:26 GMT 2009


From: <hkclark at gmail.com>
On Sat, Mar 21, 2009 at 11:08 AM, Octavian Râsnita <orasnita at gmail.com> 
wrote:
> Kennedy
>
> Yes it works that way, but it doesn't create the Result directory and it
> doesn't store the result classes in it. It just updates the old classes.
> But if I delete the old classes, or at least the old schema class, it
> creates the "Result" directory and put them in it, and it also creates the
> new schema class which uses load_namespaces().
> But in this second case, it doesn't remember what was after "do not modify
> this or anything above" in the result classes, and the update should be 
> done
> manually.
>
> And I don't know if this is the expected behaviour or there is a bug or I 
> am
> doing something wrong.
>
> Octavian
>

Are you using v0.23 of Catalyst::Model::DBIC::Schema:

perl -MCatalyst::Model::DBIC::Schema -e \
        'print "$Catalyst::Model::DBIC::Schema::VERSION\n"'

If so, it should create the Result directory and use load_namespaces
instead of load_classes.

If you are seeing something different, please let us know, but my
understanding is that v0.23 should do load_namespaces by default.

Thanks,
Kennedy

Yes, I use that version:

C:\Documents and Settings\Octavian>perl -MCatalyst::Model::DBIC::Schema -e 
"print $Catalyst::Model::DBIC::Schema::VERSION"
Subroutine initialize redefined at E:/perl510/site/lib/Class/C3.pm line 70.
Subroutine uninitialize redefined at E:/perl510/site/lib/Class/C3.pm line 
88.
Subroutine reinitialize redefined at E:/perl510/site/lib/Class/C3.pm line 
101.
0.23

(With this occasion I've installed the latest version of Class::C3 and now 
those warnings don't appear anymore.)

But I've tried again to re-create the result classes, however the schema 
class still uses load_classes() and the "Result" directory is not created.

I've created another table in the database and I ran again the Catalyst 
helper, but the class for the new table is created in the same directory 
with the other classes, and still there is no Result directory created and 
the schema class still uses load_classes().

If I delete at least the schema class file, the helper works fine and the 
new schema file uses load_namespaces() and the result classes are stored in 
the "Result" directory, but in that case what's after "do not modify this or 
anything above" is not remembered.

I use:
Windows XP Pro
perl, v5.10.0 built for MSWin32-x86-multi-thread
Catalyst::Helper::Model::DBIC::Schema version 0.23.
DBIx::Class version 0.08008.

(I've upgraded to DBIx::Class 0.08010 and tried again to create the class 
files, but with the same results.)

I can't upgrade to the version 0.08012 because when I try to install 
DBIx::Class, it crashes the perl interpreter, and there is no ppm package 
for this version yet, but... is it important this upgrade?

Octavian




More information about the Catalyst mailing list