Sponsoring The Perl Toolchain Summit 2025: Help make this important event another success Learn more

NAME

Module::Which::List - Lists .pm files under specified library paths

SYNOPSIS

use Module::Which::List qw(list_pm_files);
my @files = list_pm_files('XML::', 'lib1/', 'lib2/');
# return all modules XML::* installed under 'lib1/' and 'lib2/'
my @files = list_pm_files('Data::Dumper'); # uses @INC

DESCRITION

Yes, I know: it is a mess down below. But release early, release often (before my breath disappears).

pm_glob => 'File::Which'
pm_root => 'File::Which::'
list_files($pm_glob, { recurse => '0|1', include => \@INC })
prefixes - take a look at Module::List
pod - take a look at Module::List
list_files('Module::Which')
=> [ { pm => 'Module::Which', path => '/usr/lib/perl5/site_perl/5.8/Module/Which.pm' } ]
list_files('Module::')
=> [
{ pm => 'Module::Build', path => '/usr/lib/perl5/site_perl/5.8/Module/Build.pm' }
{ pm => 'Module::Find', path => '/usr/lib/perl5/site_perl/5.8/Module/Find.pm' },
{ pm => 'Module::Which', path => '/usr/lib/perl5/site_perl/5.8/Module/Which.pm' }
]

BUGS

This documentation, in such a status, is a bug.

Please report bugs via CPAN RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module-Which.

AUTHOR

Adriano R. Ferreira, <ferreira@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Adriano R. Ferreira

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