2 package Moose::Meta::Method::Delegation;
8 use Scalar::Util 'blessed', 'weaken';
10 our $VERSION = '0.57';
11 $VERSION = eval $VERSION;
12 our $AUTHORITY = 'cpan:STEVAN';
14 use base 'Moose::Meta::Method';
21 (exists $options{attribute})
22 || confess "You must supply an attribute to construct with";
24 (blessed($options{attribute}) && $options{attribute}->isa('Class::MOP::Attribute'))
25 || confess "You must supply an attribute which is a 'Class::MOP::Attribute' instance";
27 ($options{package_name} && $options{name})
28 || confess "You must supply the package_name and name parameters $Class::MOP::Method::UPGRADE_ERROR_TEXT";
30 my $self = $class->_new(\%options);
32 weaken($self->{'attribute'});