NAME
PM::Packages - Find all packages from a .pm file
SYNOPSIS
use PM::Packages;
my @packages = pm_packages( "Honk/Bonk.pm" );
DESCRIPTION
pm_packages
returns all packages a given file creates. It does this by doing a text scan of the file, looking for lines that start with package
. It ignores POD, __END__ and __DATA__.
It will ignore a package that is split onto two lines.
package
Is::Ignored;
It can not detect packages that are created programatically.
This code was copied from PAUSE::pmfile::packages_per_pmfile.
AUTHOR
Philip Gwyn, <gwyn -AT- cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2023 by Philip Gwyn
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.26.3 or, at your option, any later version of Perl 5 you may have available.