delete $is_removable{blessed};
delete $is_removable{confess};
-sub extends { Mouse::Meta::Class->initialize(caller)->superclasses(@_) }
+sub extends { Mouse::Meta::Class->initialize(scalar caller)->superclasses(@_) }
sub has {
- my $meta = Mouse::Meta::Class->initialize(caller);
+ my $meta = Mouse::Meta::Class->initialize(scalar caller);
$meta->add_attribute(@_);
}
sub before {
- my $meta = Mouse::Meta::Class->initialize(caller);
+ my $meta = Mouse::Meta::Class->initialize(scalar caller);
my $code = pop;
}
sub after {
- my $meta = Mouse::Meta::Class->initialize(caller);
+ my $meta = Mouse::Meta::Class->initialize(scalar caller);
my $code = pop;
}
sub around {
- my $meta = Mouse::Meta::Class->initialize(caller);
+ my $meta = Mouse::Meta::Class->initialize(scalar caller);
my $code = pop;
}
sub with {
- Mouse::Util::apply_all_roles((caller)[0], @_);
+ Mouse::Util::apply_all_roles(scalar(caller), @_);
}
our $SUPER_PACKAGE;
delete $is_removable{blessed};
sub before {
- my $meta = Mouse::Meta::Role->initialize(caller);
+ my $meta = Mouse::Meta::Role->initialize(scalar caller);
my $code = pop;
for (@_) {
}
sub after {
- my $meta = Mouse::Meta::Role->initialize(caller);
+ my $meta = Mouse::Meta::Role->initialize(scalar caller);
my $code = pop;
for (@_) {
}
sub around {
- my $meta = Mouse::Meta::Role->initialize(caller);
+ my $meta = Mouse::Meta::Role->initialize(scalar caller);
my $code = pop;
for (@_) {
}
sub has {
- my $meta = Mouse::Meta::Role->initialize(caller);
+ my $meta = Mouse::Meta::Role->initialize(scalar caller);
my $name = shift;
my %opts = @_;
sub extends { confess "Roles do not currently support 'extends'" }
sub with {
- my $meta = Mouse::Meta::Role->initialize(caller);
+ my $meta = Mouse::Meta::Role->initialize(scalar caller);
my $role = shift;
my $args = shift || {};
confess "Mouse::Role only supports 'with' on individual roles at a time" if @_ || !ref $args;
}
sub requires {
- my $meta = Mouse::Meta::Role->initialize(caller);
+ my $meta = Mouse::Meta::Role->initialize(scalar caller);
Carp::croak "Must specify at least one method" unless @_;
$meta->add_required_methods(@_);
}