Subject: | MooseX::App::Plugin::Term issue ? |
Date: | Fri, 19 Feb 2016 12:46:51 +0000 |
To: | "bug-moosex-app [...] rt.cpan.org" <bug-moosex-app [...] rt.cpan.org> |
From: | Marc Logghe <Marc.Logghe [...] ablynx.com> |
Hi Maroš,
I'm currently in the process of creating a custom plugin but ran into an issue. So, I decided to take a few steps back and use the Term plugin as an example and actually ran into the very same issue when trying out the synopsis.
The output is shown below.
I have the impression I'm overlooking something.
Thanks and regards,
Marc
Found unknown argument 'cmd_term' in the attribute constructor for 'some_option' in class MyApp::SomeCommand at /usr/lib/perl5/Moose/Meta/Attribute.pm line 118.
Moose::Meta::Attribute::new('Moose::Meta::Class::__ANON__::SERIAL::13', 'some_option', 'definition_context', 'HASH(0x2defeb8)', 'documentation', 'Something', 'cmd_term', 1, 'is', ...) called at /usr/local/share/perl/5.18.2/MooseX/App/Meta/Role/Attribute/Option.pm line 66
Class::MOP::Class:::around('CODE(0x251ae60)', 'Moose::Meta::Class::__ANON__::SERIAL::13', 'some_option', 'definition_context', 'HASH(0x2defeb8)', 'documentation', 'Something', 'cmd_term', 1, ...) called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 162
Class::MOP::Method::Wrapped::__ANON__('Moose::Meta::Class::__ANON__::SERIAL::13', 'some_option', 'definition_context', 'HASH(0x2defeb8)', 'documentation', 'Something', 'cmd_term', 1, 'is', ...) called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 91
Moose::Meta::Class::__ANON__::SERIAL::13::new('Moose::Meta::Class::__ANON__::SERIAL::13', 'some_option', 'definition_context', 'HASH(0x2defeb8)', 'documentation', 'Something', 'cmd_term', 1, 'is', ...) called at /usr/lib/perl5/Moose/Meta/Attribute.pm line 129
Moose::Meta::Attribute::interpolate_class_and_new('Moose::Meta::Class::__ANON__::SERIAL::13', 'some_option', 'cmd_term', 1, 'definition_context', 'HASH(0x2defeb8)', 'isa', 'Int', 'is', ...) called at /usr/lib/perl5/Moose/Meta/Class.pm line 714
Moose::Meta::Class::_process_new_attribute('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x39597b0)', 'some_option', 'cmd_term', 1, 'definition_context', 'HASH(0x2defeb8)', 'isa', 'Int', 'is', ...) called at /usr/lib/perl5/Moose/Meta/Class.pm line 707
Moose::Meta::Class::_process_attribute('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x39597b0)', 'some_option', 'cmd_term', 1, 'definition_context', 'HASH(0x2defeb8)', 'isa', 'Int', 'is', ...) called at /usr/lib/perl5/Moose/Meta/Class.pm line 576
Moose::Meta::Class::add_attribute('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x39597b0)', 'some_option', 'cmd_term', 1, 'definition_context', 'HASH(0x2defeb8)', 'isa', 'Int', 'is', ...) called at /usr/local/share/perl/5.18.2/MooseX/App/Exporter.pm line 70
MooseX::App::Exporter::_handle_attribute('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x39597b0)', 'some_option', 'option', 'is', 'rw', 'isa', 'Int', 'documentation', 'Something', ...) called at /usr/local/share/perl/5.18.2/MooseX/App/Exporter.pm line 42
MooseX::App::Exporter::option('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x39597b0)', 'some_option', 'is', 'rw', 'isa', 'Int', 'documentation', 'Something', 'cmd_term', ...) called at /usr/lib/perl5/Moose/Exporter.pm line 409
MooseX::App::Command::option('some_option', 'is', 'rw', 'isa', 'Int', 'documentation', 'Something', 'cmd_term', 1, ...) called at lib/MyApp/SomeCommand.pm line 4
require MyApp/SomeCommand.pm called at /usr/local/share/perl/5.18.2/Module/Runtime.pm line 317
Module::Runtime::require_module('MyApp::SomeCommand') called at /usr/share/perl5/Class/Load.pm line 177
Class::Load::try {...} () called at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 76
eval {...} called at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 72
Try::Tiny::try('CODE(0x391d2b0)', 'Try::Tiny::Catch=REF(0x391d730)') called at /usr/share/perl5/Class/Load.pm line 183
Class::Load::try_load_class('MyApp::SomeCommand') called at /usr/local/share/perl/5.18.2/MooseX/App/Role/Base.pm line 19
MooseX::App::Role::Base::initialize_command_class('MyApp', 'MyApp::SomeCommand') called at /usr/local/share/perl/5.18.2/MooseX/App.pm line 134
MooseX::App::new_with_command('MyApp') called at ./myapp line 3
usage:
myapp some_command [long options...]
myapp help
myapp some_command --help
options:
--help -h --usage -? Prints this usage information. [Flag]
--some_option Something [Integer]
Show quoted text
________________________________________
THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE.
If the reader of this E-mail message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately at ablynx@ablynx.com. Thank you for your co-operation.
"NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V.
________________________________________