On Wed, 14 Mar 2012 13:45:30 -0500 Jesse Luehrs <[email protected]> wrote:
> Yes. There's no expectation that ->new is the only way to create new > objects, classes have multiple constructors all the time (this is > common in pretty much any object oriented language, not just in > Perl). These other constructors are typically just wrappers around > the default constructor, but this is yet another reason to not shove > all of this logic into the default constructor - it makes adding > additional ways to create instances of your class even harder. I wonder if we couldn't extend Moose::Meta::Method::Constructor to act as a container of available constructors with the ability to toggle which is considered the "default" constructor. -- Nicholas Perez XMPP/Email: [email protected] https://metacpan.org/author/NPEREZ http://github.com/nperez
