Re: [CDBI] Does Class::DBI require hash-based objects?

[prev] [thread] [next] [Date index for 2006/01/03]

From: Matt S Trout
Subject: Re: [CDBI] Does Class::DBI require hash-based objects?
Date: 18:54 on 03 Jan 2006
On Tue, Jan 03, 2006 at 05:17:57PM -0000, Jesse Sookne wrote:
> Does Class::DBI require that its subclasses (application base classes as
> described in the Class::DBI doc) use hash-based objects?
 
Probably. You *might* be able to get away with it if you rewrote get, set
and the _attribute_* methods but I wouldn't bet on it.
 
> I'm attempting to use Class::DBI along with Class::Std.  Classes based
> on Class::Std don't use hash-based objects - they use scalar-based
> objects and hash-based attributes.  (See the Class:Std documentation or
> "Perl Best Practices" from O'Reilly for more on this).  Has anyone done
> this before?
 
I doubt it; Class::Std is hardly production-quality. Object::InsideOut might
be rather more interesting as such things go.

Please bear in mind that PBP is fundamentally "Damian's Best Practices", and
that large chunks of the perl community have adopted a "nod, smile, ignore"
approach to it. Damian's a great language designer but a lot of his
implementation work is pretty awful (look at NEXT.pm sometime ...)
 
> If this is something I need to post more info about (e.g. a failing test
> case), I'll do that.  But I was hoping there might be an easy answer to
> this (e.g. some documentation I've missed, etc).

I'm working hard on getting DBIx::Class to use only a very basic API for
its result classes such that you can implement them however the hell you
like; I strongly suspect that with Class::DBI it simply isn't going to be
possible but would have no objections to being proved wrong.

        -- 
             Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

Re: [CDBI] Does Class::DBI require hash-based objects?
Matt S Trout 18:54 on 03 Jan 2006

Re: [CDBI] Does Class::DBI require hash-based objects?
Steven Mackenzie 19:12 on 03 Jan 2006

Re: [CDBI] Does Class::DBI require hash-based objects?
Steven Mackenzie 20:23 on 03 Jan 2006

Re: [CDBI] Does Class::DBI require hash-based objects?
Steven Mackenzie 16:09 on 05 Jan 2006

Generated at 01:21 on 10 Jan 2006 by mariachi v0.52