in reply to Rename a Moo constructor from "new" to "run"
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Rename a Moo constructor from "new" to "run"
by tobyink (Canon) on Mar 30, 2019 at 20:05 UTC | |
by karlgoethebier (Abbot) on Mar 30, 2019 at 20:25 UTC | |
by tobyink (Canon) on Apr 01, 2019 at 15:58 UTC | |
by karlgoethebier (Abbot) on Apr 01, 2019 at 16:40 UTC | |
by bliako (Abbot) on Mar 30, 2019 at 22:59 UTC | |
by choroba (Cardinal) on Mar 30, 2019 at 23:06 UTC | |
by bliako (Abbot) on Mar 30, 2019 at 23:34 UTC | |
| |
by karlgoethebier (Abbot) on Mar 31, 2019 at 12:48 UTC |