[Dbix-class] RFC: InflateColumn::FS
Matt S Trout
dbix-class at trout.me.uk
Thu Oct 2 02:32:40 BST 2008
On Tue, Sep 30, 2008 at 10:30:28AM -0700, Marc Mims wrote:
> I recently watched Matt's lightning talk:
> http://yapc.tv/2008/ye/lt/lt1-12-trout-arent-good-enough/
>
> I've got some code I haven't shared with the world, yet, so perhaps it's
> time. It probably has bugs. :-)
>
> So, for your comments, here's DBIx::Class::InflateColumn::FS. (Please
> suggest a better name.)
>
> http://www.questright.com/perl/DBIx-Class-InflateColumn-FS-0.00000_01.tar.gz
>
> I created a variation of this module after attempting to use
> InflateColumn::File and finding it had some design limitations and
> wasn't appropriate for my project. I wasn't able to figure out how to
> resolve the design limitations and keep InflateColumn::File backwards
> compatible. If someone can suggest how that can be done, that may be
> preferable to adding yet-another-module.
Nice start; not sure about compat but this code is definitely worth putting
out there.
I'll happily give you svn space for it and we can figure out how to deprecate
IC::File in favour of it later.
> InflateColumn::FS uses file system storage for BLOBS rather than storing
> them in the DB. It inflates columns to Path::Class::File objects. It
> can deflate from a Path::Class::File or a filehandle.
>
> The deflated value, in this implementation, is simply the value 1 (or
> undef for NULL columns). The file name is derived from a path supplied
> in column_info, the PK (assumed to be integer in this implementation),
> and the column name.
Consider $self->ident_values to get the PK values, IIRC.
> If this proves useful enough for inclusion in CPAN, it will be my first
> CPAN upload. A little mentoring would be appreciated.
Either this is getting uploaded or we're finding a way to integrate it
into core to replace ::File.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the DBIx-Class
mailing list