CC: | rjbs [...] icgroup.com |
Subject: | Method does not appear in parameterized role |
Date: | Fri, 01 Apr 2011 16:40:39 -0400 |
To: | bug-moose [...] rt.cpan.org |
From: | Mark Jason Dominus <mjd [...] plover.com> |
The following code:
package Application;
use Moose::Role;
package Xport;
use Moose::Exporter;
Moose::Exporter->setup_import_methods(
role_metaroles => {
application_to_role => [ 'Application' ],
},
);
package PRole;
use MooseX::Role::Parameterized;
role {
my ($p, %args) = @_;
Xport->import({ into => $args{operating_on}->name });
method unpublished_method => sub { "With your mouth" };
};
package main;
use Moose;
with (PRole => {});
my $o = main->new();
$o->unpublished_method;
should run silently, but instead it dies on the last line, with:
Can't locate object method "unpublished_method" via package
"main" at bug2 line 24.
Perl is 5.10.1. Module versions are:
AutoLoader 5.68
Carp 1.11
Carp::Heavy
Class::MOP 1.12
Class::MOP::Attribute 1.12
Class::MOP::Class 1.12
Class::MOP::Class::Immutable::Trait 1.12
Class::MOP::Deprecated 1.12
Class::MOP::Instance 1.12
Class::MOP::Method 1.12
Class::MOP::Method::Accessor 1.12
Class::MOP::Method::Constructor 1.12
Class::MOP::Method::Generated 1.12
Class::MOP::Method::Inlined 1.12
Class::MOP::Method::Meta 1.12
Class::MOP::Method::Wrapped 1.12
Class::MOP::MiniTrait 1.12
Class::MOP::Mixin 1.12
Class::MOP::Mixin::AttributeCore 1.12
Class::MOP::Mixin::HasAttributes 1.12
Class::MOP::Mixin::HasMethods 1.12
Class::MOP::Module 1.12
Class::MOP::Object 1.12
Class::MOP::Package 1.12
Config
Data::OptList 0.106
Devel::GlobalDestruction 0.02
DynaLoader 1.10
Exporter 5.63
List::MoreUtils 0.22
List::Util 1.21
MRO::Compat 0.11
Moose 1.24
Moose::Deprecated 1.24
Moose::Error::Default 1.24
Moose::Exporter 1.24
Moose::Meta::Attribute 1.24
Moose::Meta::Attribute::Native 1.24
Moose::Meta::Class 1.24
Moose::Meta::Class::Immutable::Trait 1.24
Moose::Meta::Instance 1.24
Moose::Meta::Method 1.24
Moose::Meta::Method::Accessor 1.24
Moose::Meta::Method::Augmented 1.24
Moose::Meta::Method::Constructor 1.24
Moose::Meta::Method::Delegation 1.24
Moose::Meta::Method::Destructor 1.24
Moose::Meta::Method::Meta 1.24
Moose::Meta::Method::Overridden 1.24
Moose::Meta::Mixin::AttributeCore 1.24
Moose::Meta::Object::Trait 1.24
Moose::Meta::Role 1.24
Moose::Meta::Role::Application 1.24
Moose::Meta::Role::Application::RoleSummation 1.24
Moose::Meta::Role::Application::ToClass 1.24
Moose::Meta::Role::Application::ToInstance 1.24
Moose::Meta::Role::Application::ToRole 1.24
Moose::Meta::Role::Attribute 1.24
Moose::Meta::Role::Composite 1.24
Moose::Meta::Role::Method 1.24
Moose::Meta::Role::Method::Conflicting 1.24
Moose::Meta::Role::Method::Required 1.24
Moose::Meta::TypeCoercion 1.24
Moose::Meta::TypeCoercion::Union 1.24
Moose::Meta::TypeConstraint 1.24
Moose::Meta::TypeConstraint::Class 1.24
Moose::Meta::TypeConstraint::DuckType 1.24
Moose::Meta::TypeConstraint::Enum 1.24
Moose::Meta::TypeConstraint::Parameterizable 1.24
Moose::Meta::TypeConstraint::Parameterized 1.24
Moose::Meta::TypeConstraint::Registry 1.24
Moose::Meta::TypeConstraint::Role 1.24
Moose::Meta::TypeConstraint::Union 1.24
Moose::Object 1.24
Moose::Role 1.24
Moose::Util 1.24
Moose::Util::MetaRole 1.24
Moose::Util::TypeConstraints 1.24
Moose::Util::TypeConstraints::OptimizedConstraints 1.24
MooseX::Role::Parameterized 0.25
MooseX::Role::Parameterized::Meta::Parameter 0.25
MooseX::Role::Parameterized::Meta::Role::Parameterizable 0.25
MooseX::Role::Parameterized::Meta::Role::Parameterized 0.25
MooseX::Role::Parameterized::Meta::Trait::Parameterized 0.25
MooseX::Role::Parameterized::Parameters 0.25
Package::DeprecationManager 0.10
Package::Stash 0.28
Package::Stash::XS 0.22
Params::Util 1.01
Scalar::Util 1.21
Sub::Exporter 0.982
Sub::Install 0.925
Sub::Name 0.04
Try::Tiny 0.07
XSLoader 0.10
base 2.14
constant 1.17
if 0.05
metaclass 1.12
mro 1.01
overload 1.07
re 0.09
strict 1.04
vars 1.01
warnings 1.06
warnings::register 1.01