[Dbix-class] dirty-flag on inflated columns

Matt S Trout dbix-class at trout.me.uk
Fri May 22 06:32:32 GMT 2009


On Thu, May 14, 2009 at 12:51:02PM -0700, Marc Mims wrote:
> * Matt S Trout <dbix-class at trout.me.uk> [090514 08:49]:
> > On Wed, May 13, 2009 at 12:10:18PM -0700, Marc Mims wrote:
> > > Ok.  So, now how to fix it?
> > > 
> > > I need a unique filename to deflate to, but I only want to create it
> > > once.  Rather than using the deflated value {_column_data}{$column}, I
> > > can create {_fs_column_filename}{$column} and use it, instead.  I need
> > > to populate {_fs_column_filename} when a row is read from the db.  Looks
> > > like I can do that by extending inflate_result.
> > 
> > Hmm. Maybe you need to generate an extra accessor group so you can tag the
> > Path::Class or whatever object on the way in?
> 
> I'm not sure what you have in mind, here.  I'll poke you on IRC if the
> following is off target.

Look at Class::Accessor::Grouped

create get_fs_column and set_fs_column methods. Create accessors appropriately.

Basic InflateColumn is kind of inelegant here.

-- 
        Matt S Trout         Catalyst and DBIx::Class consultancy with a clue
     Technical Director      and a commit bit: http://shadowcat.co.uk/catalyst/
 Shadowcat Systems Limited
  mst (@) shadowcat.co.uk        http://shadowcat.co.uk/blog/matt-s-trout/



More information about the DBIx-Class mailing list