in reply to Rename a Moo constructor from "new" to "run"
I don't see a problem with having two names for the method that creates an object, if $object->run(...) is more descriptive than $object->new(...) in the code. But could be that I'm missing some point?sub run { my $class = shift; return $class->new( @_ ); }
I am curious as to why this thing is an object instead of just a function call? There is considerable overhead in object oriented code. Why pay for something you don't need?
Update: I replied to stevieb instead of to this post. But I figure my questions re: X-Y problem seem valid.
|
|---|