[Dbix-class] Problem with DBIx::Class::Schema::Loader

Nathanial Hendler nathan at petfinder.com
Mon Aug 28 17:19:12 CEST 2006


On Wed, 2006-08-23 at 18:07 -0500, Brandon Black wrote:
> 
> 
> On 8/23/06, James Masters <james at masters.me.uk> wrote:
>         I'm new to DBIx and have managed to get DBIx::Class working
>         using mysql by
>         setting up a couple of test schema modules.
>         
>         I don't really understand what Loader does. Does it create a
>         whole load of
>         module files with the schema info that I would otherwise have
>         to write out 
>         manually and then read them in?  If so, presumably, this only
>         needs to
>         happen once so do I just write a sepeare script to run once?
>         
>         Or does it simply read my MySQL database tables columns and
>         wotnot into
>         memory every time and dispenses with the schema info modules
>         altogether
>         (this is what I was hoping it would do).
> 
> It can do either one, depending on how you use it.  The "normal" way
> of using it 
> scans the database at load time into memory and doesn't create any
> modules/files,
> but you can also invoke it a different way and it will generate module
> files on disk,
> which look about like a manually-written schema and can be edited from
> there. 

Is there an example anywhere of doing it the "abnormal" way?  I'm not
sure of all the things that need to be done to keep it from having to
scan the database at load time.

Thanks,
Nathan





More information about the Dbix-class mailing list