1Module::Build::ModuleInUfsoe(r3)Contributed Perl DocumenMtoadtuiloen::Build::ModuleInfo(3)
2
3
4

NAME

6       ModuleInfo - Gather package and POD information from a perl module
7       files
8

DESCRIPTION

10       new_from_file($filename, collect_pod => 1)
11           Construct a ModuleInfo object given the path to a file. Takes an
12           optional arguement "collect_pod" which is a boolean that determines
13           whether POD data is collected and stored for reference. POD data is
14           not collected by default. POD headings are always collected.
15
16       new_from_module($module, collect_pod => 1, inc => \@dirs)
17           Construct a ModuleInfo object given a module or package name. In
18           addition to accepting the "collect_pod" argument as described
19           above, this method accepts a "inc" arguemnt which is a reference to
20           an array of of directories to search for the module. If none are
21           given, the default is @INC.
22
23       name()
24           Returns the name of the package represented by this module. If
25           there are more than one packages, it makes a best guess based on
26           the filename. If it's a script (i.e. not a *.pm) the package name
27           is 'main'.
28
29       version($package)
30           Returns the version as defined by the $VERSION variable for the
31           package as returned by the "name" method if no arguments are given.
32           If given the name of a package it will attempt to return the ver‐
33           sion of that package if it is specified in the file.
34
35       filename()
36           Returns the absolute path to the file.
37
38       packages_inside()
39           Returns a list of packages.
40
41       pod_inside()
42           Returns a list of POD sections.
43
44       contains_pod()
45           Returns true if there is any POD in the file.
46
47       pod($section)
48           Returns the POD data in the given section.
49
50       find_module_by_name($module, \@dirs)
51           Returns the path to a module given the module or package name. A
52           list of directories can be passed in as an optional paramater, oth‐
53           erwise @INC is searched.
54
55           Can be called as either an object or a class method.
56
57       find_module_dir_by_name($module, \@dirs)
58           Returns the entry in @dirs (or @INC by default) that contains the
59           module $module. A list of directories can be passed in as an
60           optional paramater, otherwise @INC is searched.
61
62           Can be called as either an object or a class method.
63

AUTHOR

65       Ken Williams <kwilliams@cpan.org>, Randy W. Sims <RandyS@ThePieri‐
66       anSpring.org>
67
69       Copyright (c) 2001-2006 Ken Williams.  All rights reserved.
70
71       This library is free software; you can redistribute it and/or modify it
72       under the same terms as Perl itself.
73

SEE ALSO

75       perl(1), Module::Build(3)
76
77
78
79perl v5.8.8                       2007-04-02      Module::Build::ModuleInfo(3)
Impressum