in reply to Re: class inheritance and new(constructor)
in thread class inheritance and new(constructor)

Class::Std and friends are of course the modules written by Damien Conway and endorsed in his "Perl Best Practices" book. These are one way of doing "inside-out objects", which have the advantage of encapsulated internal state (with hash based objects you can access a field of the hash directly if you feel like cheating, with inside-out objects you're forced to use the accessors).

I haven't played with this concept much myself: they sound neat, but I think they're still a little too new. For example, there's some debate about whether "Class::Std" is really the right way to do it. I quote from the documentation for Class::InsideOut:

* Class::Std -- Despite the name, this does not reflect currently known best practices for inside-out objects. Does not provide thread-safety with CLONE and doesn't support foreign inheritance. Has a robust inheritance/initialization system.
  • Comment on Re^2: class inheritance and new(constructor)