On Tue, May 12, 2009 at 01:51:00PM -0700, Marc Mims wrote:
> * Matt S Trout <[email protected]> [090512 11:34]:
> > On Mon, May 11, 2009 at 12:14:07PM -0700, Marc Mims wrote:
> > > * Matt S Trout <[email protected]> [090511 10:29]:
> > > > Thoughts on whether make_column_dirty should clear the deflated value 
> > > > if an
> > > > inflated one is present, guys?
> > > 
> > > That would break DBIx::Class::InflateColumn::FS, causing it to leave an
> > > orphaned file in the file system.
> > 
> > Why?
> 
> FS uses the deflated value to determine whether it needs to overwrite an
> existing file or create a new file.  If the deflated value is cleared by
> make_column_dirty, FS will always make a copy, potentially orphaning a
> file in fs_column_path.

That's a bug. Deflation should not be dependent on the deflated value even
being there - store_inflated_column for e.g. deletes the deflated value.

So your code was already broken, you just hadn't noticed yet - doc patches
to ::InflateColumn on writing safe inflators very welcome :)

-- 
        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/

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to