Subject: | Change to Moops->import arguments |
I've changed the way arguments are passed to Moops->import. Instead of:
use Moops \@imports;
It's:
use Moops %options;
Where "imports" is one of the options; e.g.
use Moops imports => [
'List::Objects::WithUtils' => [qw/array immarray hash/],
'List::Objects::Types' => [ -all ],
];
If a Moops notices that only single arrayref has been passed as an argument, it will still handle that for backwards compatibility, but that may change in the future.
The reason for this change is to allow import to take other options, not just a list of imports. So far I've added the "traits" option to allow the caller to specify additional parser traits.
Anyway, this change doesn't currently break MoopsX::ListObjects, but it does limit it - users can't pass a "traits" option to the MoopsX::ListObjects import method.