1Find(3)               User Contributed Perl Documentation              Find(3)
2
3
4

NAME

6       Module::Find - Find and use installed modules in a (sub)category
7

SYNOPSIS

9         use Module::Find;
10
11         # use all modules in the Plugins/ directory
12         @found = usesub Mysoft::Plugins;
13
14         # use modules in all subdirectories
15         @found = useall Mysoft::Plugins;
16
17         # find all DBI::... modules
18         @found = findsubmod DBI;
19
20         # find anything in the CGI/ directory
21         @found = findallmod CGI;
22
23         # set your own search dirs (uses @INC otherwise)
24         setmoduledirs(@INC, @plugindirs, $appdir);
25
26         # not exported by default
27         use Module::Find qw(ignoresymlinks followsymlinks);
28
29         # ignore symlinks
30         ignoresymlinks();
31
32         # follow symlinks (default)
33         followsymlinks();
34

DESCRIPTION

36       Module::Find lets you find and use modules in categories. This can be
37       very useful for auto-detecting driver or plugin modules. You can
38       differentiate between looking in the category itself or in all
39       subcategories.
40
41       If you want Module::Find to search in a certain directory on your
42       harddisk (such as the plugins directory of your software installation),
43       make sure you modify @INC before you call the Module::Find functions.
44

FUNCTIONS

46       "setmoduledirs(@directories)"
47           Sets the directories to be searched for modules. If not set,
48           Module::Find will use @INC. If you use this function, @INC will not
49           be included automatically, so add it if you want it. Set to undef
50           to revert to default behaviour.
51
52       "@found = findsubmod Module::Category"
53           Returns modules found in the Module/Category subdirectories of your
54           perl installation. E.g. "findsubmod CGI" will return
55           "CGI::Session", but not "CGI::Session::File" .
56
57       "@found = findallmod Module::Category"
58           Returns modules found in the Module/Category subdirectories of your
59           perl installation. E.g. "findallmod CGI" will return "CGI::Session"
60           and also "CGI::Session::File" .
61
62       "@found = usesub Module::Category"
63           Uses and returns modules found in the Module/Category
64           subdirectories of your perl installation. E.g. "usesub CGI" will
65           return "CGI::Session", but not "CGI::Session::File" .
66
67       "@found = useall Module::Category"
68           Uses and returns modules found in the Module/Category
69           subdirectories of your perl installation. E.g. "useall CGI" will
70           return "CGI::Session" and also "CGI::Session::File" .
71
72       "ignoresymlinks()"
73           Do not follow symlinks. This function is not exported by default.
74
75       "followsymlinks()"
76           Follow symlinks (default behaviour). This function is not exported
77           by default.
78

HISTORY

80       0.01, 2004-04-22
81               Original version; created by h2xs 1.22
82
83       0.02, 2004-05-25
84               Added test modules that were left out in the first version.
85               Thanks to Stuart Johnston for alerting me to this.
86
87       0.03, 2004-06-18
88               Fixed a bug (non-localized $_) by declaring a loop variable in
89               use functions.  Thanks to Stuart Johnston for alerting me to
90               this and providing a fix.
91
92               Fixed non-platform compatibility by using File::Spec.  Thanks
93               to brian d foy.
94
95               Added setmoduledirs and updated tests. Idea shamelessly stolen
96               from ...errm... inspired by brian d foy.
97
98       0.04, 2005-05-20
99               Added POD tests.
100
101       0.05, 2005-11-30
102               Fixed issue with bugfix in PathTools-3.14.
103
104       0.06, 2008-01-26
105               Module::Find now won't report duplicate modules several times
106               anymore (thanks to Uwe VA~Xlker for the report and the patch)
107
108       0.07, 2009-09-08
109               Fixed RT#38302: Module::Find now follows symlinks by default
110               (can be disabled).
111

DEVELOPMENT NOTES

113       Please report any bugs sing the CPAN RT system. The development
114       repository for this module is hosted on GitHub:
115       http://github.com/crenz/Module-Find/ <http://github.com/crenz/Module-
116       Find/>.
117

SEE ALSO

119       perl
120

AUTHOR

122       Christian Renz, <crenz@web42.com>
123
125       Copyright 2004-2008 by Christian Renz <crenz@web42.com>. All rights
126       reserved.
127
128       This library is free software; you can redistribute it and/or modify it
129       under the same terms as Perl itself.
130
131
132
133perl v5.12.0                      2009-09-08                           Find(3)
Impressum