NAME

lib::coreplus - Allow core modules plus a few others

VERSION

This document describes version 0.27 of lib::coreplus (from Perl distribution lib-filter), released on 2016-08-24.

SYNOPSIS

 % perl -Mlib::coreplus=Clone,Data::Structure::Util yourscript.pl

DESCRIPTION

This pragma uses lib::filter's custom filter to accomplish its function.

Rationale for this pragma: using lib::filter's allow_noncore=0+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 allow_noncore=0.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/lib-filter.

SOURCE

Source repository is at https://github.com/perlancar/perl-lib-filter.

BUGS

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.

SEE ALSO

lib::filter

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.