Msts Vox post about monkey patching reminded me this morning that I needed to put this somewhere:
> *DBIx::Class::Row::get_inflated_columns =3D sub {
> my $self =3D shift;
>=20
> return map {$_ =3D> $self->$_} $self->columns;
> };
I stuffed it into my DBIC provider just to try it on for size.
Now, I can put this into a base class and have all my schema classes
inherit from that. Sure, it's so easy, a cave man can do it. But I'm not
the first, nor will I be the last to write these three lines of code and
inherit a base classes for source classes just to do this very thing.
Can we just put this in DBIC already?
-=3DChris
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
