lib::coreplus - Allow core modules plus a few others
This document describes version 0.24 of lib::coreplus (from Perl distribution lib-filter), released on 2016-07-08.
% perl -Mlib::coreplus=Clone,Data::Structure::Util yourscript.pl
This pragma uses lib::filter's custom
filter to accomplish its function.
Rationale for this pragma: using
allow doesn't work for non-core XS modules because
allow_noncore=0 will remove non-core directories from
@INC, while XS modules will still look for their loadable objects in
@INC during loading.
So the alternative approach used by
lib::coreplus is to check the module against
Module::CoreList->is_core. If the module is not a core module according to
is_core, it is then checked against the list of additional modules specified by the user. If both checks fail, the module is disallowed. lib::coreplus does not remove directories from
@INC because it does not use
Please visit the project's homepage at https://metacpan.org/release/lib-filter.
Source repository is at https://github.com/perlancar/perl-lib-filter.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=lib-filter
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
This software is copyright (c) 2016 by email@example.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.