I guess: If you want a different implementation a role with a method modifier (around) might be a way to go. I’m not sure. Unfortunately i can‘t provide an example because i‘m about to set up my new machine. Regards, Karl
Update:
Probably it might be interesting for you what i wrote a while ago to illustrate how to overwrite a constructor using inheritance using Class::Tiny. You may call it plugin, interface, fubar or what ever you like.
I hope it is helpful and inspiring. And doesn’t look sub run { shift->SUPER::new(@_) } cool? 😎
«The Crux of the Biscuit is the Apostrophe»
perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help
In reply to Re: Rename a Moo constructor from "new" to "run"
by karlgoethebier
in thread Rename a Moo constructor from "new" to "run"
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |