einhverfr has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monks;
I am trying to simplify some code here and would like to take a set of interfaces in one class and turn them into a Moo role.
I tries with and extends and neither one would work. It seems I can use base but that leads to a lot of problems. Any ideas?
I would like to do something like this (pseudocode):
package foo; sub foo { print "foo\n"; } package bar; use Moo::Role; extends 'foo';
I can't figure out how to accomplish this though. Is it even reasonably possible?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Way to use Moo::Role to extend non-Moo class?
by Arunbear (Prior) on Nov 13, 2013 at 10:49 UTC | |
by einhverfr (Friar) on Nov 13, 2013 at 11:07 UTC | |
|
Re: Way to use Moo::Role to extend non-Moo class?
by tobyink (Canon) on Nov 13, 2013 at 12:04 UTC |