[Dbix-class] Proposed readonly patch for DBIx::Class

Ashley Pond V apv at sedition.com
Sun Aug 21 06:25:55 GMT 2011


On Sat, Aug 20, 2011 at 8:03 PM, Rob Kinyon <rob.kinyon at gmail.com> wrote:
> It'd be nice if DBIC would convert the accessors to read-only. I think
> that's the point.

In addition to the ++ for the idea I gave before I'll give a recent
story: I needed this for a current project and instead ended up with a
half-baked component and a whitelist hash to throw fatals on inserts
and updates. In my case it was for legacy code which was riddled with
side-effects during database operations so it was important to have
most of the the old stuff that got run through DBIC be readonly while
letting the new stuff act normal.

 __PACKAGE__->readonly(1);

…is much cleaner and more maintenance friendly and I surely would like
it and use it.



More information about the DBIx-Class mailing list