This queue is for tickets about the MooX-Options CPAN distribution.

Report information
The Basics
Id:
122351
Status:
rejected
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
ether [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
(no value)
Fixed in:
(no value)



Subject: subs are imported rather than added as methods
usage with namespace::clean or namespace::autoclean results in: Can't apply MooX::Options::Role to Your::Class - missing _options_data, _options_config at .../Moo/Role.pm line 288. Please install the subs properly with Sub::Install, not the trainwreck of an eval in MooX::Options::import.
On 2017-07-03 15:35:17, ETHER wrote:
Show quoted text
> usage with namespace::clean or namespace::autoclean results in: > > Can't apply MooX::Options::Role to Your::Class - missing > _options_data, _options_config at .../Moo/Role.pm line 288. > > Please install the subs properly with Sub::Install, not the trainwreck > of an eval in MooX::Options::import.
PS. You might also find it useful to use Test::CleanNamespaces in your test suite to check the composed classes.
If I understand your report correctly, it's a duplicate of https://github.com/celogeek/MooX-Options/issues/58. If not, please express much clearer what's your issue is. Otherwise I'll close it as duplicate within a week. Feel free to reopen then.
On 2017-07-04 01:16:16, REHSACK wrote:
Show quoted text
> If I understand your report correctly, it's a duplicate of > https://github.com/celogeek/MooX-Options/issues/58. > > If not, please express much clearer what's your issue is. Otherwise > I'll close it as duplicate within a week. Feel free to reopen then.
That's not the same issue at all, and it's also been closed. package My::Class; use Moo; use MooX::Options; use namespace::clean; option myoption => (is => 'lazy', format => 's', builder => sub { 'a string' }); 1; results in: Can't apply MooX::Options::Role to My::Class - missing _options_data, _options_config at .../lib/perl5/Moo/Role.pm line 288. At a bare minimum, it needs to be documented that usage of namespace::clean (which is recommended by the Moo documentation) needs to be configured as: use namespace::clean -except => [ qw(_options_data _options_config) ]; or possibly use Moo; use namespace::clean; use MooX::Options; use namespace::clean 'option';


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.