Subject: | Some packages don't compile standalone |
Some packages don't compile standalone. (Why do I want to do this? To ensure that a package is fully installed.)
$ perl -MMoose::Meta::TypeConstraint::Union -e 1
The 'add_attribute' method cannot be called on an immutable instance at /usr/local/lib64/perl5/5.18.1/x86_64-linux-thread-multi/Class/MOP/Class/Immutable/Trait.pm line 32.
Class::MOP::Class::Immutable::Trait::_immutable_cannot_call('add_attribute') called at /usr/local/lib64/perl5/5.18.1/x86_64-linux-thread-multi/Class/MOP/Class/Immutable/Trait.pm line 47
Class::MOP::Class:::around('CODE(0x1f335d0)', 'Class::MOP::Class::Immutable::Class::MOP::Class=HASH(0x22234c0)', 'type_constraints', 'accessor', 'type_constraints', 'default', 'CODE(0x1d21b40)', 'definition_context', 'HASH(0x2784f90)', ...) called at /usr/local/lib64/perl5/5.18.1/x86_64-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 162
Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::Immutable::Class::MOP::Class=HASH(0x22234c0)', 'type_constraints', 'accessor', 'type_constraints', 'default', 'CODE(0x1d21b40)', 'definition_context', 'HASH(0x2784f90)') called at /usr/local/lib64/perl5/5.18.1/x86_64-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 91
Class::MOP::Class::Immutable::Class::MOP::Class::add_attribute('Class::MOP::Class::Immutable::Class::MOP::Class=HASH(0x22234c0)', 'type_constraints', 'accessor', 'type_constraints', 'default', 'CODE(0x1d21b40)', 'definition_context', 'HASH(0x2784f90)') called at /usr/local/lib64/perl5/5.18.1/x86_64-linux-thread-multi/Moose/Meta/TypeConstraint/Union.pm line 24
require Moose/Meta/TypeConstraint/Union.pm called at -e line 0
main::BEGIN() called at /usr/local/lib64/perl5/5.18.1/x86_64-linux-thread-multi/Moose/Meta/TypeConstraint/Union.pm line 0
eval {...} called at /usr/local/lib64/perl5/5.18.1/x86_64-linux-thread-multi/Moose/Meta/TypeConstraint/Union.pm line 0
Compilation failed in require.
BEGIN failed--compilation aborted.