I have perl 5.10.1 installed on my ubuntu machine. I wanted to install the Moose and MooseX extentions, so I did install the packages with the aptitude package manager. Here are all the packages I have installed:
$ sudo apt-cache pkgnames | grep moose
libmoosex-singleton-perl
libmoosex-compiletime-traits-perl
libmoosex-types-structured-perl
libmoosex-traits-pluggable-perl
libmoosex-nonmoose-perl
libmoosex-methodattributes-perl
libmoosex-strictconstructor-perl
libmoosex-classattribute-perl
libany-moose-perl
libmoosex-traits-perl
libmoosex-meta-typeconstraint-forcecoercion-perl
libmoosex-attributehelpers-perl
libmoosex-types-set-object-perl
libmoosex-multiinitarg-perl
libmoosex-has-sugar-perl
libmoosex-role-withoverloading-perl
libmoosex-getopt-perl
libmoosex-aliases-perl
libmoosex-types-varianttable-perl
libmoosex-types-datetime-perl
libmoosex-yaml-perl
libmoosex-daemonize-perl
libmoosex-blessed-reconstruct-perl
libmoosex-emulate-class-accessor-fast-perl
libmoosex-poe-perl
libmoose-perl
libmoosex-types-common-perl
libmoosex-async-perl
libmoosex-method-signatures-perl
libmoosex-storage-perl
libmoosex-log-log4perl-perl
libmoose-policy-perl
libmoosex-semiaffordanceaccessor-perl
libmoose-autobox-perl
libmoosex-app-cmd-perl
libmoosex-role-parameterized-perl
libmoosex-params-validate-perl
libmoosex-object-pluggable-perl
libmoosex-declare-perl
libmoosex-lazyrequire-perl
libmoosex-methodattributes
libmoosex-clone-perl
libmoosex-types-perl
libmoosex-types-path-class-perl
My question is, why do I get gibberish when I run code that uses the MooseX::* extentions? Is there a way to enable a silent mode? Using just Moose will not show anything else at output but the desired results, but here is what I get if I use MooseX::Declare :
$ ./myPerlProg.pl
The old Moose::Util::MetaRole API (before version 0.94) has been deprecated at /usr/local/lib/perl/5.10.1/Moose/Util/MetaRole.pm line 16
Moose::Util::MetaRole::apply_metaclass_roles('for_class', 'MooseX::Method::Signatures', 'attribute_metaclass_roles', 'ARRAY(0x9ec2988)') called at /usr/share/perl5/MooseX/LazyRequire.pm line 15
MooseX::LazyRequire::init_meta('MooseX::LazyRequire', 'for_class', 'MooseX::Method::Signatures', 'metaclass', undef) called at /usr/local/lib/perl/5.10.1/Moose/Exporter.pm line 355
Moose::Exporter::__ANON__('MooseX::LazyRequire') called at /usr/share/perl5/MooseX/Method/Signatures.pm line 10
MooseX::Method::Signatures::BEGIN() called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
eval {...} called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
require MooseX/Method/Signatures.pm called at /usr/share/perl5/MooseX/Declare/Syntax/MethodDeclaration.pm line 5
MooseX::Declare::Syntax::MethodDeclaration::BEGIN() called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
eval {...} called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
require MooseX/Declare/Syntax/MethodDeclaration.pm called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 114
Class::MOP::__ANON__() called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 71
eval {...} called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 67
Try::Tiny::try('CODE(0x9acde78)', 'Try::Tiny::Catch=REF(0x9a966a8)') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 125
Class::MOP::load_first_existing_class('MooseX::Declare::Syntax::MethodDeclaration') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 137
Class::MOP::load_class('MooseX::Declare::Syntax::MethodDeclaration', undef) called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 109
Moose::Util::_apply_all_roles('Moose::Meta::Class=HASH(0x9ac6200)', undef, 'MooseX::Declare::Syntax::MethodDeclaration') called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 87
Moose::Util::apply_all_roles('Moose::Meta::Class=HASH(0x9ac6200)', 'MooseX::Declare::Syntax::MethodDeclaration') called at /usr/local/lib/perl/5.10.1/Moose.pm line 58
Moose::with('Moose::Meta::Class=HASH(0x9ac6200)', 'MooseX::Declare::Syntax::MethodDeclaration') called at /usr/local/lib/perl/5.10.1/Moose/Exporter.pm line 294
Moose::with('MooseX::Declare::Syntax::MethodDeclaration') called at /usr/share/perl5/MooseX/Declare/Syntax/Keyword/MethodModifier.pm line 9
require MooseX/Declare/Syntax/Keyword/MethodModifier.pm called at (eval 205) line 1
MooseX::Declare::Syntax::MooseSetup::BEGIN() called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
eval {...} called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
eval 'package MooseX::Declare::Syntax::MooseSetup; use MooseX::Declare::Syntax::Keyword::MethodModifier;' called at /usr/share/perl5/aliased.pm line 50
aliased::_load_alias('MooseX::Declare::Syntax::Keyword::MethodModifier', 'MooseX::Declare::Syntax::MooseSetup') called at /usr/share/perl5/aliased.pm line 20
aliased::import('aliased', 'MooseX::Declare::Syntax::Keyword::MethodModifier') called at /usr/share/perl5/MooseX/Declare/Syntax/MooseSetup.pm line 8
MooseX::Declare::Syntax::MooseSetup::BEGIN() called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
eval {...} called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
require MooseX/Declare/Syntax/MooseSetup.pm called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 114
Class::MOP::__ANON__() called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 71
eval {...} called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 67
Try::Tiny::try('CODE(0x9ab31c8)', 'Try::Tiny::Catch=REF(0x9a8e398)') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 125
Class::MOP::load_first_existing_class('MooseX::Declare::Syntax::MooseSetup') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 137
Class::MOP::load_class('MooseX::Declare::Syntax::MooseSetup', undef) called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 109
Moose::Util::_apply_all_roles('Moose::Meta::Class=HASH(0x9a054b8)', undef, 'MooseX::Declare::Syntax::MooseSetup', 'MooseX::Declare::Syntax::RoleApplication', 'MooseX::Declare::Syntax::Extending') called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 87
Moose::Util::apply_all_roles('Moose::Meta::Class=HASH(0x9a054b8)', 'MooseX::Declare::Syntax::MooseSetup', 'MooseX::Declare::Syntax::RoleApplication', 'MooseX::Declare::Syntax::Extending') called at /usr/local/lib/perl/5.10.1/Moose.pm line 58
Moose::with('Moose::Meta::Class=HASH(0x9a054b8)', 'MooseX::Declare::Syntax::MooseSetup', 'MooseX::Declare::Syntax::RoleApplication', 'MooseX::Declare::Syntax::Extending') called at /usr/local/lib/perl/5.10.1/Moose/Exporter.pm line 294
Moose::with('MooseX::Declare::Syntax::MooseSetup', 'MooseX::Declare::Syntax::RoleApplication', 'MooseX::Declare::Syntax::Extending') called at /usr/share/perl5/MooseX/Declare/Syntax/Keyword/Class.pm line 7
require MooseX/Declare/Syntax/Keyword/Class.pm called at (eval 1) line 1
MooseX::Declare::BEGIN() called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
eval {...} called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
eval 'package MooseX::Declare; use MooseX::Declare::Syntax::Keyword::Class;' called at /usr/share/perl5/aliased.pm line 50
aliased::_load_alias('MooseX::Declare::Syntax::Keyword::Class', 'MooseX::Declare') called at /usr/share/perl5/aliased.pm line 20
aliased::import('aliased', 'MooseX::Declare::Syntax::Keyword::Class', 'ClassKeyword') called at /usr/share/perl5/MooseX/Declare.pm line 6
MooseX::Declare::BEGIN() called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
eval {...} called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
require MooseX/Declare.pm called at ./myPerlProg10.pl line 3
main::BEGIN() called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
eval {...} called at /usr/share/perl5/MooseX/LazyRequire.pm line 10
Variable "$class" is not imported at ./myPerlProg10.pl line 12.