Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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: (6)
As of 2014-12-28 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (181 votes), past polls