Subject: | meta trouble |
I was trying to call 'meta->calculate_all_roles' on all of Dancer2's
objects which can meta.
I get two error messages which I don't really understand. I am guessing
here that both errors have something to do with Moo's FakeMetaClass.pm
Below are traces with Moo 1.000007 and current Moose.
I have looked at the two respective Dancer classes
(Dancer::Core::Role::Config and Dancer::Core::Request at
https://github.com/PerlDancer/Dancer2/tree/master/lib/Dancer/Core). They
look ok to me.
Any ideas? Thanks! Much appreciated.
Use of uninitialized value $type_constraint_name in substitution (s///)
at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Util/TypeConstraints.pm line 294, <DATA> line 998.
Moose::Util::TypeConstraints::normalize_type_constraint_name(undef)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Util/TypeConstraints.pm line 271
Moose::Util::TypeConstraints::find_or_parse_type_constraint(undef)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Util/TypeConstraints.pm line 260
Moose::Util::TypeConstraints::find_or_create_isa_type_constraint(undef,
'HASH(0x80ee8d20)') called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-
threads-64int/Moose/Meta/Attribute.pm line 369
Moose::Meta::Attribute::_process_isa_option('Moose::Meta::Attribute',
'config_location', 'HASH(0x80c30c80)') called at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Attribute.pm line 296
Moose::Meta::Attribute::_process_options('Moose::Meta::Attribute',
'config_location', 'HASH(0x80c30c80)') called at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Attribute.pm line 88
Moose::Meta::Attribute::new('Moose::Meta::Attribute',
'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'isa', undef, 'builder', ...) called at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Attribute.pm line 114
Moose::Meta::Attribute::interpolate_class_and_new('Moose::Meta::Attribut
e', 'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Class.pm line 704
Moose::Meta::Class::_process_new_attribute('Moose::Meta::Class=HASH(0x80
e09b38)', 'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Class.pm line 697
Moose::Meta::Class::_process_attribute('Moose::Meta::Class=HASH(0x80e09b
38)', 'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Class.pm line 566
Moose::Meta::Class::add_attribute('Moose::Meta::Class=HASH(0x80e09b38)',
'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/Moo/HandleMoose.pm line 124
Moo::HandleMoose::inject_real_metaclass_for('Dancer::Core::App')
called at /usr/lib/perl5/site_perl/5.14/Moo/HandleMoose/FakeMetaClass.pm
line 8
Moo::HandleMoose::FakeMetaClass::AUTOLOAD('Moo::HandleMoose::FakeMetaCla
ss=HASH(0x801d9998)') called at t/meta.t line 38
main::wanted() called at /usr/lib/perl5/5.14/File/Find.pm line
781
File::Find::_find_dir('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib', 1) called at
/usr/lib/perl5/5.14/File/Find.pm line 569
File::Find::_find_opt('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib') called at
/usr/lib/perl5/5.14/File/Find.pm line 1070
File::Find::find('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib') called at t/meta.t line 18
Use of uninitialized value $_[0] in pattern match (m//) at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Util/TypeConstraints.pm line 695, <DATA> line 998.
Moose::Util::TypeConstraints::_detect_type_constraint_union(undef)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Util/TypeConstraints.pm line 274
Moose::Util::TypeConstraints::find_or_parse_type_constraint(undef)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Util/TypeConstraints.pm line 260
Moose::Util::TypeConstraints::find_or_create_isa_type_constraint(undef,
'HASH(0x80ee8d20)') called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-
threads-64int/Moose/Meta/Attribute.pm line 369
Moose::Meta::Attribute::_process_isa_option('Moose::Meta::Attribute',
'config_location', 'HASH(0x80c30c80)') called at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Attribute.pm line 296
Moose::Meta::Attribute::_process_options('Moose::Meta::Attribute',
'config_location', 'HASH(0x80c30c80)') called at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Attribute.pm line 88
Moose::Meta::Attribute::new('Moose::Meta::Attribute',
'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'isa', undef, 'builder', ...) called at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Attribute.pm line 114
Moose::Meta::Attribute::interpolate_class_and_new('Moose::Meta::Attribut
e', 'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Class.pm line 704
Moose::Meta::Class::_process_new_attribute('Moose::Meta::Class=HASH(0x80
e09b38)', 'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Class.pm line 697
Moose::Meta::Class::_process_attribute('Moose::Meta::Class=HASH(0x80e09b
38)', 'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Class.pm line 566
Moose::Meta::Class::add_attribute('Moose::Meta::Class=HASH(0x80e09b38)',
'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/Moo/HandleMoose.pm line 124
Moo::HandleMoose::inject_real_metaclass_for('Dancer::Core::App')
called at /usr/lib/perl5/site_perl/5.14/Moo/HandleMoose/FakeMetaClass.pm
line 8
Moo::HandleMoose::FakeMetaClass::AUTOLOAD('Moo::HandleMoose::FakeMetaCla
ss=HASH(0x801d9998)') called at t/meta.t line 38
main::wanted() called at /usr/lib/perl5/5.14/File/Find.pm line
781
File::Find::_find_dir('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib', 1) called at
/usr/lib/perl5/5.14/File/Find.pm line 569
File::Find::_find_opt('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib') called at
/usr/lib/perl5/5.14/File/Find.pm line 1070
File::Find::find('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib') called at t/meta.t line 18
Use of uninitialized value $_[0] in pattern match (m//) at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Util/TypeConstraints.pm line 674, <DATA> line 998.
Moose::Util::TypeConstraints::_detect_parameterized_type_constraint(unde
f) called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Util/TypeConstraints.pm line 274
Moose::Util::TypeConstraints::find_or_parse_type_constraint(undef)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Util/TypeConstraints.pm line 260
Moose::Util::TypeConstraints::find_or_create_isa_type_constraint(undef,
'HASH(0x80ee8d20)') called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-
threads-64int/Moose/Meta/Attribute.pm line 369
Moose::Meta::Attribute::_process_isa_option('Moose::Meta::Attribute',
'config_location', 'HASH(0x80c30c80)') called at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Attribute.pm line 296
Moose::Meta::Attribute::_process_options('Moose::Meta::Attribute',
'config_location', 'HASH(0x80c30c80)') called at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Attribute.pm line 88
Moose::Meta::Attribute::new('Moose::Meta::Attribute',
'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'isa', undef, 'builder', ...) called at
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Attribute.pm line 114
Moose::Meta::Attribute::interpolate_class_and_new('Moose::Meta::Attribut
e', 'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Class.pm line 704
Moose::Meta::Class::_process_new_attribute('Moose::Meta::Class=HASH(0x80
e09b38)', 'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Class.pm line 697
Moose::Meta::Class::_process_attribute('Moose::Meta::Class=HASH(0x80e09b
38)', 'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-
64int/Moose/Meta/Class.pm line 566
Moose::Meta::Class::add_attribute('Moose::Meta::Class=HASH(0x80e09b38)',
'config_location', 'reader', 'config_location', 'init_arg',
'config_location', 'builder', '_build_config_location', 'isa', ...)
called at /usr/lib/perl5/site_perl/5.14/Moo/HandleMoose.pm line 124
Moo::HandleMoose::inject_real_metaclass_for('Dancer::Core::App')
called at /usr/lib/perl5/site_perl/5.14/Moo/HandleMoose/FakeMetaClass.pm
line 8
Moo::HandleMoose::FakeMetaClass::AUTOLOAD('Moo::HandleMoose::FakeMetaCla
ss=HASH(0x801d9998)') called at t/meta.t line 38
main::wanted() called at /usr/lib/perl5/5.14/File/Find.pm line
781
File::Find::_find_dir('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib', 1) called at
/usr/lib/perl5/5.14/File/Find.pm line 569
File::Find::_find_opt('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib') called at
/usr/lib/perl5/5.14/File/Find.pm line 1070
File::Find::find('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib') called at t/meta.t line 18
Dancer::Core::Request
Can't call method "coercion" on an undefined value at
/usr/lib/perl5/site_perl/5.14/Moo/HandleMoose.pm line 107, <DATA> line
998.
Moo::HandleMoose::inject_real_metaclass_for('Dancer::Core::Request')
called at /usr/lib/perl5/site_perl/5.14/Moo/HandleMoose/FakeMetaClass.pm
line 8
Moo::HandleMoose::FakeMetaClass::AUTOLOAD('Moo::HandleMoose::FakeMetaCla
ss=HASH(0x81052750)') called at t/meta.t line 38
main::wanted() called at /usr/lib/perl5/5.14/File/Find.pm line
781
File::Find::_find_dir('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib', 1) called at
/usr/lib/perl5/5.14/File/Find.pm line 569
File::Find::_find_opt('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib') called at
/usr/lib/perl5/5.14/File/Find.pm line 1070
File::Find::find('HASH(0x8002bea8)',
'/home/maurice/projects/dancer2/t/../lib') called at t/meta.t line 18