Module-Find-0.17/0000755000175000017500000000000014754455550012606 5ustar crenzcrenzModule-Find-0.17/Find.pm0000644000175000017500000002310114754455533014022 0ustar crenzcrenzpackage Module::Find; use 5.008001; use strict; use warnings; use File::Spec; use File::Find; our $VERSION = '0.17'; our $basedir = undef; our @results = (); our $prune = 0; our $followMode = 1; our @ISA = qw(Exporter); our @EXPORT = qw(findsubmod findallmod usesub useall setmoduledirs); our @EXPORT_OK = qw(followsymlinks ignoresymlinks); =encoding utf-8 =head1 NAME Module::Find - Find and use installed modules in a (sub)category =head1 SYNOPSIS use Module::Find; # use all modules in the Plugins/ directory @found = usesub Mysoft::Plugins; # use modules in all subdirectories @found = useall Mysoft::Plugins; # find all DBI::... modules @found = findsubmod DBI; # find anything in the CGI/ directory @found = findallmod CGI; # set your own search dirs (uses @INC otherwise) setmoduledirs(@INC, @plugindirs, $appdir); # not exported by default use Module::Find qw(ignoresymlinks followsymlinks); # ignore symlinks ignoresymlinks(); # follow symlinks (default) followsymlinks(); =head1 DESCRIPTION Module::Find lets you find and use modules in categories. This can be very useful for auto-detecting driver or plugin modules. You can differentiate between looking in the category itself or in all subcategories. If you want Module::Find to search in a certain directory on your harddisk (such as the plugins directory of your software installation), make sure you modify C<@INC> before you call the Module::Find functions. =head1 FUNCTIONS =over =item C Sets the directories to be searched for modules. If not set, Module::Find will use @INC. If you use this function, @INC will I be included automatically, so add it if you want it. Set to undef to revert to default behaviour. =cut sub setmoduledirs { return @Module::Find::ModuleDirs = grep { defined } @_; } =item C<@found = findsubmod Module::Category> Returns modules found in the Module/Category subdirectories of your perl installation. E.g. C will return C, but not C . =cut sub findsubmod(*) { $prune = 1; return _find($_[0]); } =item C<@found = findallmod Module::Category> Returns modules found in the Module/Category subdirectories of your perl installation. E.g. C will return C and also C . =cut sub findallmod(*) { $prune = 0; return _find($_[0]); } =item C<@found = usesub Module::Category> Uses and returns modules found in the Module/Category subdirectories of your perl installation. E.g. C will return C, but not C . If any module dies during loading, usesub will also die at this point. =cut sub usesub(*) { $prune = 1; my @r = _find($_[0]); local @INC = @Module::Find::ModuleDirs if (@Module::Find::ModuleDirs); foreach my $m (@r) { eval " require $m; import $m ; "; die $@ if $@; } return @r; } =item C<@found = useall Module::Category> Uses and returns modules found in the Module/Category subdirectories of your perl installation. E.g. C will return C and also C . If any module dies during loading, useall will also die at this point. =cut sub useall(*) { $prune = 0; my @r = _find($_[0]); local @INC = @Module::Find::ModuleDirs if (@Module::Find::ModuleDirs); foreach my $m (@r) { eval " require $m; import $m; "; die $@ if $@; } return @r; } # 'wanted' functions for find() # you know, this would be a nice application for currying... sub _wanted { my $name = File::Spec->abs2rel($_, $basedir); return unless $name && $name ne File::Spec->curdir() && substr($name, 0, 1) ne '.'; if (-d && $prune) { $File::Find::prune = 1; return; } return unless /\.pm$/; $name =~ s|\.pm$||; $name = join('::', File::Spec->splitdir($name)); push @results, $name; } # helper functions for finding files sub _find(*) { my ($category) = @_; return undef unless defined $category; my $dir = File::Spec->catdir(split(/::|'/, $category)); @results = (); foreach my $inc (@Module::Find::ModuleDirs ? @Module::Find::ModuleDirs : @INC) { if (ref $inc) { if (my @files = eval { $inc->files }) { push @results, map { s/^\Q$category\E::// ? $_ : () } map { s{/}{::}g; s{\.pm$}{}; $_ } grep { /\.pm$/ } @files; } } else { our $basedir = File::Spec->catdir($inc, $dir); next unless -d $basedir; find({wanted => \&_wanted, no_chdir => 1, follow => $followMode}, $basedir); } } # filter duplicate modules my %seen = (); @results = grep { not $seen{$_}++ } @results; @results = map "$category\::$_", @results; @results = map { ($_ =~ m{^(\w+(?:(?:::|')\w+)*)$})[0] || die "$_ does not look like a package name" } @results; return @results; } =item C Do not follow symlinks. This function is not exported by default. =cut sub ignoresymlinks { $followMode = 0; } =item C Follow symlinks (default behaviour). This function is not exported by default. =cut sub followsymlinks { $followMode = 1; } =back =head1 HISTORY =over 8 =item 0.01, 2004-04-22 Original version; created by h2xs 1.22 =item 0.02, 2004-05-25 Added test modules that were left out in the first version. Thanks to Stuart Johnston for alerting me to this. =item 0.03, 2004-06-18 Fixed a bug (non-localized $_) by declaring a loop variable in use functions. Thanks to Stuart Johnston for alerting me to this and providing a fix. Fixed non-platform compatibility by using File::Spec. Thanks to brian d foy. Added setmoduledirs and updated tests. Idea shamelessly stolen from ...errm... inspired by brian d foy. =item 0.04, 2005-05-20 Added POD tests. =item 0.05, 2005-11-30 Fixed issue with bugfix in PathTools-3.14. =item 0.06, 2008-01-26 Module::Find now won't report duplicate modules several times anymore (thanks to Uwe Völker for the report and the patch) =item 0.07, 2009-09-08 Fixed RT#38302: Module::Find now follows symlinks by default (can be disabled). =item 0.08, 2009-09-08 Fixed RT#49511: Removed Mac OS X extended attributes from distribution =item 0.09, 2010-02-26 Fixed RT#38302: Fixed META.yml generation (thanks very much to cpanservice for the help). =item 0.10, 2010-02-26 Fixed RT#55010: Removed Unicode BOM from Find.pm. =item 0.11, 2012-05-22 Fixed RT#74251: defined(@array) is deprecated under Perl 5.15.7. Thanks to Roman F, who contributed the implementation. =item 0.12, 2014-02-08 Fixed RT#81077: useall fails in taint mode Thanks to Aran Deltac, who contributed the implementation and test. Fixed RT#83596: Documentation doesn't describe behaviour if a module fails to load Clarified documentation for useall and usesub. Fixed RT#62923: setmoduledirs(undef) doesn't reset to searching @INC Added more explicit tests. Thanks to Colin Robertson for his input. =item 0.13, 2015-03-09 This release contains two contributions from Moritz Lenz: Link to Module::Pluggable and Class::Factory::Util in "SEE ALSO" Align package name parsing with how perl does it (allowing single quotes as module separator) Also, added a test for meta.yml =item 0.14, 2019-12-25 A long overdue update. Thank you for the many contributions! Fixed RT#99055: Removed file readability check (pull request contributed by Moritz Lenz) Now supports @INC hooks (pull request contributed by Graham Knop) Now filters out filenames starting with a dot (pull request contributed by Desmond Daignault) Now uses strict (pull request contributed by Shlomi Fish) Fixed RT#122016: test/ files show up in metacpan (bug report contributed by Karen Etheridge) =item 0.15, 2019-12-26 Fixed RT#127657 (bug report contributed by Karen Etheridge): Module::Find now uses @ModuleDirs (if specified) for loading modules. Previously, when using setmoduledirs() to set an array of directories that did not contain @INC, Module::Find would find the modules correctly, but load them from @INC. =item 0.16, 2022-08-01 Fixes an issue where symlink tests failed on systems that do not support creation of symlinks. The issue appears on Windows systems due to changed behaviour in C described in L Symlink tests were previously skipped if C is not available, and now also if creation of a symlink is not possible. Fixes L. Note that on Windows system, the patch to C from L will be required for proper operation. =item 0.17, 2025-02-16 Fixes L / L<148978|https://rt.cpan.org/Ticket/Display.html?id=148978> where warnings where produced upon extracting the installation archive, which prevented installation under cpanm and other tools. =back =head1 DEVELOPMENT NOTES The development repository for this module is hosted on GitHub: L. Please report any bugs by opening an issue there. =head1 SEE ALSO L, L, L =head1 AUTHOR Christian Renz, Ecrenz@web42.comE =head1 COPYRIGHT AND LICENSE Copyright 2004-2025 by Christian Renz . All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut 1; Module-Find-0.17/MANIFEST.skip0000644000175000017500000000007614754455533014710 0ustar crenzcrenz~$ \.svn \.DS_Store \.bak \.old dist \.tar.gz$ blib Makefile$ Module-Find-0.17/Changes0000644000175000017500000000005314754455533014100 0ustar crenzcrenzSee Find.pm for a detailed version history.Module-Find-0.17/examples/0000755000175000017500000000000014754455550014424 5ustar crenzcrenzModule-Find-0.17/examples/example.pl0000644000175000017500000000057014754455533016417 0ustar crenzcrenzuse Module::Find; # use all modules in the Plugins/ directory @found = usesub Mysoft::Plugins; # use modules in all subdirectories @found = useall Mysoft::Plugins; # find all DBI::... modules @found = findsubmod DBI; # find anything in the CGI/ directory @found = findallmod CGI; # set your own search dirs (uses @INC otherwise) setmoduledirs(@INC, @plugindirs, $appdir);Module-Find-0.17/META.json0000664000175000017500000000232014754455550014226 0ustar crenzcrenz{ "abstract" : "Find and use installed modules in a (sub)category", "author" : [ "Christian Renz " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Module-Find", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "Test::More" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "recommends" : { "Test::Pod" : "1.14", "Test::Pod::Coverage" : "1.04" }, "requires" : { "File::Find" : "0", "File::Spec" : "0", "perl" : "5.008001" } } }, "release_status" : "stable", "resources" : { "repository" : { "url" : "http://github.com/crenz/Module-Find" } }, "version" : "0.17", "x_serialization_backend" : "JSON::PP version 4.16" } Module-Find-0.17/Makefile.PL0000644000175000017500000000365314754455533014570 0ustar crenzcrenzuse strict; use warnings; use 5.008001; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile1( MIN_PERL_VERSION => '5.008001', META_MERGE => { resources => { repository => 'http://github.com/crenz/Module-Find', }, recommends => { 'Test::Pod::Coverage' => 1.04, 'Test::Pod' => 1.14, #not a build prereq, dist can be built without it }, }, BUILD_REQUIRES => { 'Test::More' => 0, }, NAME => 'Module::Find', VERSION_FROM => 'Find.pm', # finds $VERSION PREREQ_PM => { 'File::Find' => 0, 'File::Spec' => 0}, ABSTRACT_FROM => 'Find.pm', # retrieve abstract from module AUTHOR => 'Christian Renz ', LICENSE => 'perl', ); sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade. my %params=@_; my $eumm_version=$ExtUtils::MakeMaker::VERSION; $eumm_version=eval $eumm_version; die "EXTRA_META is deprecated" if exists $params{EXTRA_META}; die "License not specified" if not exists $params{LICENSE}; if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) { #EUMM 6.5502 has problems with BUILD_REQUIRES $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} }; delete $params{BUILD_REQUIRES}; } delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52; delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48; delete $params{META_MERGE} if $eumm_version < 6.46; delete $params{META_ADD} if $eumm_version < 6.46; delete $params{LICENSE} if $eumm_version < 6.31; delete $params{AUTHOR} if $] < 5.005; delete $params{ABSTRACT_FROM} if $] < 5.005; delete $params{BINARY_LOCATION} if $] < 5.005; WriteMakefile(%params); } Module-Find-0.17/t/0000755000175000017500000000000014754455550013051 5ustar crenzcrenzModule-Find-0.17/t/12-loadfail.t0000644000175000017500000000074214754455533015235 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 8; use Module::Find; use lib qw(./t/test); my @l; @l = findsubmod LoadFailTest; ok($#l == 0); ok($l[0] eq 'LoadFailTest::LoadFailMod'); eval { @l = usesub LoadFailTest }; ok($#l == 0); ok($l[0] eq 'LoadFailTest::LoadFailMod'); ok($@); # OK if loading failed and returned an error eval { @l = useall LoadFailTest }; ok($#l == 0); ok($l[0] eq 'LoadFailTest::LoadFailMod'); ok($@); # OK if loading failed and returned an error Module-Find-0.17/t/test/0000755000175000017500000000000014754455550014030 5ustar crenzcrenzModule-Find-0.17/t/test/LoadFailTest/0000755000175000017500000000000014754455550016343 5ustar crenzcrenzModule-Find-0.17/t/test/LoadFailTest/LoadFailMod.pm0000644000175000017500000000005614754455533021016 0ustar crenzcrenzpackage LoadFailTest::LoadFailMod; return 0; Module-Find-0.17/t/test/duplicates/0000755000175000017500000000000014754455550016165 5ustar crenzcrenzModule-Find-0.17/t/test/duplicates/ModuleFindTest/0000755000175000017500000000000014754455550021053 5ustar crenzcrenzModule-Find-0.17/t/test/duplicates/ModuleFindTest/SubMod/0000755000175000017500000000000014754455550022244 5ustar crenzcrenzModule-Find-0.17/t/test/duplicates/ModuleFindTest/SubMod/SubSubMod.pm0000644000175000017500000000013414754455533024444 0ustar crenzcrenzpackage ModuleFindTest::SubMod::SubSubMod; $ModuleFindTest::SubMod::SubSubMod::loaded = 1; Module-Find-0.17/t/test/duplicates/ModuleFindTest/SubMod.pm0000644000175000017500000000010614754455533022600 0ustar crenzcrenzpackage ModuleFindTest::SubMod; $ModuleFindTest::SubMod::loaded = 1; Module-Find-0.17/t/test/duplicates/ModuleFindTest.pm0000644000175000017500000000006614754455533021414 0ustar crenzcrenzpackage ModuleFindTest; $ModuleFindTest::loaded = 1; Module-Find-0.17/t/test/README0000644000175000017500000000016714754455533014715 0ustar crenzcrenzThis folder contains a few module files to test the functionality of Module::Find. Use "make test" to run the tests. Module-Find-0.17/t/test/ModuleFindTest/0000755000175000017500000000000014754455550016716 5ustar crenzcrenzModule-Find-0.17/t/test/ModuleFindTest/SubMod/0000755000175000017500000000000014754455550020107 5ustar crenzcrenzModule-Find-0.17/t/test/ModuleFindTest/SubMod/SubSubMod.pm0000644000175000017500000000013414754455533022307 0ustar crenzcrenzpackage ModuleFindTest::SubMod::SubSubMod; $ModuleFindTest::SubMod::SubSubMod::loaded = 1; Module-Find-0.17/t/test/ModuleFindTest/SubMod.pm0000644000175000017500000000015114754455533020443 0ustar crenzcrenzpackage ModuleFindTest::SubMod; sub theRealDeal { return 1; } $ModuleFindTest::SubMod::loaded = 1; Module-Find-0.17/t/test/ModuleFindTest.pm0000644000175000017500000000006614754455533017257 0ustar crenzcrenzpackage ModuleFindTest; $ModuleFindTest::loaded = 1; Module-Find-0.17/t/04-useall.t0000644000175000017500000000074214754455533014750 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 5; use Module::Find; use lib qw(./t/test); my @l; @l = useall ModuleFindTest; ok($#l == 1); ok($l[0] eq 'ModuleFindTest::SubMod'); ok($l[1] eq 'ModuleFindTest::SubMod::SubSubMod'); ok($ModuleFindTest::SubMod::loaded); ok($ModuleFindTest::SubMod::SubSubMod::loaded); package ModuleFindTest::SubMod; $ModuleFindTest::SubMod::loaded = 0; package ModuleFindTest::SubSubMod; $ModuleFindTest::SubMod::SubSubMod::loaded = 0; Module-Find-0.17/t/52-pod-coverage.t0000644000175000017500000000025414754455533016037 0ustar crenzcrenz#!perl -T use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; all_pod_coverage_ok(); Module-Find-0.17/t/08-taint.t0000644000175000017500000000063014754455533014602 0ustar crenzcrenz#!perl -T use strict; use warnings; use Test::More tests => 4; use Module::Find; use lib qw(./t/test); findsubmod ModuleFindTest; usesub ModuleFindTest; ok($ModuleFindTest::SubMod::loaded); ok(!$ModuleFindTest::SubMod::SubSubMod::loaded); useall ModuleFindTest; ok($ModuleFindTest::SubMod::loaded); ok($ModuleFindTest::SubMod::SubSubMod::loaded); setmoduledirs('./test'); findallmod ModuleFindTest; Module-Find-0.17/t/03-usesub.t0000644000175000017500000000065714754455533014775 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 4; use Module::Find; use lib qw(./t/test); my @l; @l = usesub ModuleFindTest; ok($#l == 0); ok($l[0] eq 'ModuleFindTest::SubMod'); ok($ModuleFindTest::SubMod::loaded); ok(!$ModuleFindTest::SubMod::SubSubMod::loaded); package ModuleFindTest::SubMod; $ModuleFindTest::SubMod::loaded = 0; package ModuleFindTest::SubSubMod; $ModuleFindTest::SubMod::SubSubMod::loaded = 0; Module-Find-0.17/t/11-wrong-module-all.t0000644000175000017500000000040614754455533016643 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 3; use Module::Find; use lib qw(./t/test-malicious); setmoduledirs('./t/test'); my @l = useall ModuleFindTest; ok($#l == 1); ok($l[0] eq 'ModuleFindTest::SubMod'); ok(ModuleFindTest::SubMod::theRealDeal()); Module-Find-0.17/t/51-pod.t0000644000175000017500000000021414754455533014241 0ustar crenzcrenz#!perl -T use Test::More; eval "use Test::Pod 1.14"; plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; all_pod_files_ok(); Module-Find-0.17/t/02-find.t0000644000175000017500000000070314754455533014376 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 7; use Module::Find; use lib qw(./t/test); my @l; @l = findsubmod ModuleFindTest; ok($#l == 0); ok($l[0] eq 'ModuleFindTest::SubMod'); @l = findallmod ModuleFindTest; ok($#l == 1); ok($l[0] eq 'ModuleFindTest::SubMod'); ok($l[1] eq 'ModuleFindTest::SubMod::SubSubMod'); @l = findallmod "ModuleFindTest'SubMod"; is($#l, 0, 'Found one module'); is($l[0], "ModuleFindTest'SubMod::SubSubMod"); Module-Find-0.17/t/01-use.t0000644000175000017500000000013214754455533014245 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 1; BEGIN { use_ok('Module::Find') }; Module-Find-0.17/t/07-symlinks.t0000644000175000017500000000300414754455533015331 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 14; use Module::Find qw(ignoresymlinks followsymlinks findsubmod findallmod); use lib qw(./t/test); my $dirName = "ModuleFindTest"; my $linkName = "./t/test/ModuleFindTestSymLink"; SKIP: { my $r = eval { symlink($dirName, $linkName) }; skip "Symlinks not supported on this system", 14 if $@; skip "Unable to create symlink", 14 if $r == 0; # Ensure link was created and is actually a symlink ok(-l $linkName); my @l; # Default behaviour: follow symlinks ----------------------- @l = findsubmod ModuleFindTestSymLink; ok($#l == 0); ok($l[0] eq 'ModuleFindTestSymLink::SubMod'); @l = findallmod ModuleFindTestSymLink; ok($#l == 1); ok($l[0] eq 'ModuleFindTestSymLink::SubMod'); ok($l[1] eq 'ModuleFindTestSymLink::SubMod::SubSubMod'); # Switch off following symlinks --------------------------- ignoresymlinks(); @l = findsubmod ModuleFindTestSymLink; ok($#l == -1); @l = findallmod ModuleFindTestSymLink; ok($#l == -1); # Re-enable it -------------------------------------------- followsymlinks(); @l = findsubmod ModuleFindTestSymLink; ok($#l == 0); ok($l[0] eq 'ModuleFindTestSymLink::SubMod'); @l = findallmod ModuleFindTestSymLink; ok($#l == 1); ok($l[0] eq 'ModuleFindTestSymLink::SubMod'); ok($l[1] eq 'ModuleFindTestSymLink::SubMod::SubSubMod'); # Clean up unlink $linkName; ok(!-e $linkName); } Module-Find-0.17/t/05-setmoduledirs.t0000644000175000017500000000206014754455533016342 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 18; use Module::Find; # First, with @INC only ok($#Module::Find::ModuleDirs == -1); my @l = findsubmod ModuleFindTest; ok($#l == -1); @l = findallmod ModuleFindTest; ok($#l == -1); # Then, including our directory setmoduledirs('./t/test'); ok($#Module::Find::ModuleDirs == 0); @l = findsubmod ModuleFindTest; ok($#l == 0); ok($l[0] eq 'ModuleFindTest::SubMod'); @l = findallmod ModuleFindTest; ok($#l == 1); ok($l[0] eq 'ModuleFindTest::SubMod'); ok($l[1] eq 'ModuleFindTest::SubMod::SubSubMod'); # Third, reset back to @INC only setmoduledirs(); ok($#Module::Find::ModuleDirs == -1); @l = findsubmod ModuleFindTest; ok($#l == -1); @l = findallmod ModuleFindTest; ok($#l == -1); # Fourth, including our directory again setmoduledirs('./t/test'); ok($#Module::Find::ModuleDirs == 0); @l = findsubmod ModuleFindTest; ok($#l == 0); ok($l[0] eq 'ModuleFindTest::SubMod'); @l = findallmod ModuleFindTest; ok($#l == 1); ok($l[0] eq 'ModuleFindTest::SubMod'); ok($l[1] eq 'ModuleFindTest::SubMod::SubSubMod'); Module-Find-0.17/t/10-wrong-module-sub.t0000644000175000017500000000040614754455533016663 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 3; use Module::Find; use lib qw(./t/test-malicious); setmoduledirs('./t/test'); my @l = usesub ModuleFindTest; ok($#l == 0); ok($l[0] eq 'ModuleFindTest::SubMod'); ok(ModuleFindTest::SubMod::theRealDeal()); Module-Find-0.17/t/09-inc-hook.t0000644000175000017500000000107214754455533015174 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 3; use Module::Find; BEGIN { package MFTestIncHook; sub files { keys %{$_[0]} }; sub MFTestIncHook::INC { if (my $fat = $_[0]{$_[1]}) { open my $fh, '<', \$fat or die "error: $!"; return $fh; } return; }; unshift @INC, bless { 'MFTest/Packed/Module.pm' => <<'END_MOD', package MFTest::Packed::Module; $VERSION = 5; END_MOD }, __PACKAGE__; } my @l = useall 'MFTest::Packed'; is scalar @l, 1; is $l[0], 'MFTest::Packed::Module'; is $MFTest::Packed::Module::VERSION, 5; Module-Find-0.17/t/50-meta.t0000644000175000017500000000022014754455533014401 0ustar crenzcrenz#!perl -T use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok();Module-Find-0.17/t/06-duplicate-modules.t0000644000175000017500000000032314754455533017100 0ustar crenzcrenzuse strict; use warnings; use Test::More tests => 1; use Module::Find; use lib qw(./t/test ./t/test/duplicates); # Ensure duplicate modules are only reported once my @l = useall ModuleFindTest; ok($#l == 1);Module-Find-0.17/MANIFEST0000644000175000017500000000134414754455550013741 0ustar crenzcrenzChanges examples/example.pl Find.pm Makefile.PL MANIFEST MANIFEST.skip META.yml Module meta-data (added by MakeMaker) README t/01-use.t t/02-find.t t/03-usesub.t t/04-useall.t t/05-setmoduledirs.t t/06-duplicate-modules.t t/07-symlinks.t t/08-taint.t t/09-inc-hook.t t/10-wrong-module-sub.t t/11-wrong-module-all.t t/12-loadfail.t t/50-meta.t t/51-pod.t t/52-pod-coverage.t t/test/duplicates/ModuleFindTest.pm t/test/duplicates/ModuleFindTest/SubMod.pm t/test/duplicates/ModuleFindTest/SubMod/SubSubMod.pm t/test/LoadFailTest/LoadFailMod.pm t/test/ModuleFindTest.pm t/test/ModuleFindTest/SubMod.pm t/test/ModuleFindTest/SubMod/SubSubMod.pm t/test/README META.json Module JSON meta-data (added by MakeMaker) Module-Find-0.17/README0000644000175000017500000000150514754455533013470 0ustar crenzcrenzModule::Find version 0.17 ========================= Module::Find lets you find and use modules in categories. This can be very useful for auto-detecting driver or plugin modules. You can differentiate between looking in the category itself or in all subcategories. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: Test::More File::Spec File::Find Optionally, the following modules can be installed to run further tests: Test::CPAN::Meta Test::Pod Test::Pod::Coverage COPYRIGHT AND LICENCE Copyright (C) 2004-2025 Christian Renz . All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Module-Find-0.17/META.yml0000664000175000017500000000132714754455550014064 0ustar crenzcrenz--- abstract: 'Find and use installed modules in a (sub)category' author: - 'Christian Renz ' build_requires: Test::More: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Module-Find no_index: directory: - t - inc recommends: Test::Pod: '1.14' Test::Pod::Coverage: '1.04' requires: File::Find: '0' File::Spec: '0' perl: '5.008001' resources: repository: http://github.com/crenz/Module-Find version: '0.17' x_serialization_backend: 'CPAN::Meta::YAML version 0.018'