1CPANPLUS::Dist::MM(3) User Contributed Perl DocumentationCPANPLUS::Dist::MM(3)
2
3
4

NAME

6       CPANPLUS::Dist::MM
7

SYNOPSIS

9           my $mm = CPANPLUS::Dist->new(
10                                       format  => 'makemaker',
11                                       module  => $modobj,
12                                   );
13           $mm->create;        # runs make && make test
14           $mm->install;       # runs make install
15

DESCRIPTION

17       "CPANPLUS::Dist::MM" is a distribution class for MakeMaker related mod‐
18       ules.  Using this package, you can create, install and uninstall perl
19       modules. It inherits from "CPANPLUS::Dist".
20

ACCESSORS

22       parent()
23           Returns the "CPANPLUS::Module" object that parented this object.
24
25       status()
26           Returns the "Object::Accessor" object that keeps the status for
27           this module.
28

STATUS ACCESSORS

30       All accessors can be accessed as follows:
31           $mm->status->ACCESSOR
32
33       makefile ()
34           Location of the Makefile (or Build file).  Set to 0 explicitly if
35           something went wrong.
36
37       make ()
38           BOOL indicating if the "make" (or "Build") command was successful.
39
40       test ()
41           BOOL indicating if the "make test" (or "Build test") command was
42           successful.
43
44       prepared ()
45           BOOL indicating if the "prepare" call exited succesfully This gets
46           set after "perl Makefile.PL"
47
48       distdir ()
49           Full path to the directory in which the "prepare" call took place,
50           set after a call to "prepare".
51
52       created ()
53           BOOL indicating if the "create" call exited succesfully. This gets
54           set after "make" and "make test".
55
56       installed ()
57           BOOL indicating if the module was installed. This gets set after
58           "make install" (or "Build install") exits successfully.
59
60       uninstalled ()
61           BOOL indicating if the module was uninstalled properly.
62
63       _create_args ()
64           Storage of the arguments passed to "create" for this object. Used
65           for recursive calls when satisfying prerequisites.
66
67       _install_args ()
68           Storage of the arguments passed to "install" for this object. Used
69           for recursive calls when satisfying prerequisites.
70

METHODS

72       $bool = $dist->format_available();
73
74       Returns a boolean indicating whether or not you can use this package to
75       create and install modules in your environment.
76
77       Sets up the "CPANPLUS::Dist::MM" object for use.  Effectively creates
78       all the needed status accessors.
79
80       Called automatically whenever you create a new "CPANPLUS::Dist" object.
81
82       "prepare" preps a distribution for installation. This means it will run
83       "perl Makefile.PL" and determine what prerequisites this distribution
84       declared.
85
86       If you set "force" to true, it will go over all the stages of the "pre‐
87       pare" process again, ignoring any previously cached results.
88
89       When running "perl Makefile.PL", the environment variable "PERL5_CPAN‐
90       PLUS_IS_EXECUTING" will be set to the full path of the "Makefile.PL"
91       that is being executed. This enables any code inside the "Makefile.PL"
92       to know that it is being installed via CPANPLUS.
93
94       Returns true on success and false on failure.
95
96       You may then call "$dist->create" on the object to create the instal‐
97       lable files.
98
99       $href = $dist->_find_prereqs( file => '/path/to/Makefile', [verbose =>
100       BOOL])
101
102       Parses a "Makefile" for "PREREQ_PM" entries and distills from that any
103       prerequisites mentioned in the "Makefile"
104
105       Returns a hash with module-version pairs on success and false on fail‐
106       ure.
107
108       $bool = $dist->create([perl => '/path/to/perl', make =>
109       '/path/to/make', makeflags => 'EXTRA=FLAGS', prereq_target => TARGET,
110       skiptest => BOOL, force => BOOL, verbose => BOOL])
111
112       "create" creates the files necessary for installation. This means it
113       will run "make" and "make test".  This will also scan for and attempt
114       to satisfy any prerequisites the module may have.
115
116       If you set "skiptest" to true, it will skip the "make test" stage.  If
117       you set "force" to true, it will go over all the stages of the "make"
118       process again, ignoring any previously cached results. It will also
119       ignore a bad return value from "make test" and still allow the opera‐
120       tion to return true.
121
122       Returns true on success and false on failure.
123
124       You may then call "$dist->install" on the object to actually install
125       it.
126
127       $bool = $dist->install([make => '/path/to/make',  makemakerflags =>
128       'EXTRA=FLAGS', force => BOOL, verbose => BOOL])
129
130       "install" runs the following command:
131           make install
132
133       Returns true on success, false on failure.
134
135       $bool = $dist->write_makefile_pl([force => BOOL, verbose => BOOL])
136
137       This routine can write a "Makefile.PL" from the information in a module
138       object. It is used to write a "Makefile.PL" when the original author
139       forgot it (!!).
140
141       Returns 1 on success and false on failure.
142
143       The file gets written to the directory the module's been extracted to.
144
145
146
147perl v5.8.8                       2007-03-31             CPANPLUS::Dist::MM(3)
Impressum