Subject: | Imports don't seem to work as described |
Hi,
The imports option to use Moops doesn't appear to import the methods supplied correctly (missing prototypes?).
The files attached show the issue using imports and how I expect with "use".
Ivan
Subject: | moops-no-import.pl |
#!/usr/bin/perl
use Moops;
class MyMoops {
use List::Util qw/reduce/;
sub test_me {
my @ints = @_;
return reduce { $a * $b } @ints;
}
}
say $Moops::VERSION;
say MyMoops->new->test_me(qw/1 2 3 4 5/);
Subject: | moops.pl |
#!/usr/bin/perl
use Moops imports => { 'List::Util' => qw/reduce/ };
class MyMoops {
sub test_me {
my @ints = @_;
return reduce { $a * $b } @ints;
}
}
say $Moops::VERSION;
say MyMoops->new->test_me(qw/1 2 3 4 5/);