in reply to Getting rid of "new"
One thing why I see no great benefit in this is that I often use other constructors instead of ->new, for example constructors named ->parse, ->load or ->create - removing that information from the constructor either makes an additional parameter necessary or removes the "gain".
Also, I often create objects through strings/factories, which is unwieldly/impossible with this approach as well:
my $class = "My::App::Plugin::$action"; my $handler = $class->new(...);
So the slight gain of eliminating ->new isn't worth it to me.
|
|---|