Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Abstract Methods in Moose

by ikegami (Pope)
on Dec 12, 2009 at 21:56 UTC ( #812543=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Abstract Methods in Moose
in thread Abstract Methods in Moose

Why do you have a role and and a base class? You should use a role instead of a base class. All you need is

package Widget::Role; # Formerly Widget::Abstract use Moose::Role; requires qw( get_widget_type ); # Abstract methods ... # Other attributes and methods. 1;
package Widget::Snazzy; use Moose; with qw( Widget::Role ); sub get_widget_type { __PACKAGE__ } ... 1;


Comment on Re^3: Abstract Methods in Moose
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://812543]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-06 03:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls