[Dbix-class] inflate_column and sql_maker->quote_char/name_sep

Matt S Trout dbix-class at trout.me.uk
Thu Mar 2 17:24:14 CET 2006


On Thu, Mar 02, 2006 at 05:04:38PM +0100, Bernhard Graf wrote:
> Matt S Trout wrote:
> 
> > There is no __PACKAGE__->storage unless you're using DB.pm, but the
> > regex to ensure DBIC doesn't barf when you have multiple packages
> > defined in one file eats the error message, unfortunately.
> >
> > Move the sql_maker stuff into your Schema class and you should be
> > fine.
> 
> Err... You mean
> 
> use base 'DBIx::Class::Schema';
> __PACKAGE__->load_classes;
> __PACKAGE__->storage->sql_maker->quote_char('`');
> __PACKAGE__->storage->sql_maker->name_sep('.');
> 
> ?
> 
> This gives me:
> 
> Can't call method "sql_maker" on an undefined value at TDW/Schema.pm line 10.
> Compilation failed in require at app.pl line 6.
> BEGIN failed--compilation aborted at app.pl line 6.

Ah. Storage isn't initialised unril you call connect/connection, as noted
in the DBIx::Class::Schema docs. Should have mentioned that, sorry.

-- 
     Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list