Subject: | incompatibility with namespace::clean |
Looks like the subs that are added by MooX::TypeTiny are wiped out by namespace::clean:
use strict;
use warnings;
{
package MyParent;
use Moo;
no Moo::sification;
use strictures 2;
use MooX::TypeTiny;
use Types::Standard 'Str';
use namespace::clean;
has mystr => (
is => 'ro',
isa => Str,
);
}
{
package MyChild;
use parent 'MyParent';
}
my $parent = MyParent->new(mystr => 'hi');
print STDERR "# got parent with ", $parent->mystr, "\n";
my $child = MyChild->new(mystr => 'morehi');
print STDERR "# got child with ", $child->mystr, "\n";
__END__
# got parent with Use of uninitialized value in print at moox-bug.pl line 25.
# got child with Use of uninitialized value in print at moox-bug.pl line 28.