Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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;

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2016-10-21 16:27 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (289 votes). Check out past polls.