why would you consider a class wrapper to autogenerate accessors to always be a bad idea?
They tend to encourage people to spread accessors everywhere throughout their classes and use them as a crutch for a broken design. Autogenerating mutators are even worse, because now you're not just grabbing internal data, but modifying it, too. You might as well be passing around a bare hash reference and tell everyone to do what they want with it.
Accessors (and to a lesser extent, mutators) can be used well, but they shouldn't be everywhere.
In fact, I'm starting to wonder if Class::DBI was actually a step backwards over Ima::DBI, which Class::DBI is based on. The reason is that Class::DBI exposes the entire database layout, while Ima::DBI performs some action based on the database using pre-defined SQL. I haven't come to a firm conclusion, though, and certainly many people have used Class::DBI to great success.
----
: () { :|:& };:
Note: All code is untested, unless otherwise stated
In reply to Re^3: "Rites of Passage" wheel reinventing
by hardburn
in thread "Rites of Passage" wheel reinventing
by dws
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |