1CPANPLUS::Dist::MM(3pm)Perl Programmers Reference GuideCPANPLUS::Dist::MM(3pm)
2
3
4
6 CPANPLUS::Dist::MM
7
9 $mm = CPANPLUS::Dist::MM->new( module => $modobj );
10
11 $mm->create; # runs make && make test
12 $mm->install; # runs make install
13
15 "CPANPLUS::Dist::MM" is a distribution class for MakeMaker related
16 modules. Using this package, you can create, install and uninstall
17 perl modules. It inherits from "CPANPLUS::Dist".
18
20 parent()
21 Returns the "CPANPLUS::Module" object that parented this object.
22
23 status()
24 Returns the "Object::Accessor" object that keeps the status for
25 this module.
26
28 All accessors can be accessed as follows:
29 $mm->status->ACCESSOR
30
31 makefile ()
32 Location of the Makefile (or Build file). Set to 0 explicitly if
33 something went wrong.
34
35 make ()
36 BOOL indicating if the "make" (or "Build") command was successful.
37
38 test ()
39 BOOL indicating if the "make test" (or "Build test") command was
40 successful.
41
42 prepared ()
43 BOOL indicating if the "prepare" call exited succesfully This gets
44 set after "perl Makefile.PL"
45
46 distdir ()
47 Full path to the directory in which the "prepare" call took place,
48 set after a call to "prepare".
49
50 created ()
51 BOOL indicating if the "create" call exited succesfully. This gets
52 set after "make" and "make test".
53
54 installed ()
55 BOOL indicating if the module was installed. This gets set after
56 "make install" (or "Build install") exits successfully.
57
58 uninstalled ()
59 BOOL indicating if the module was uninstalled properly.
60
61 _create_args ()
62 Storage of the arguments passed to "create" for this object. Used
63 for recursive calls when satisfying prerequisites.
64
65 _install_args ()
66 Storage of the arguments passed to "install" for this object. Used
67 for recursive calls when satisfying prerequisites.
68
70 $bool = $dist->format_available();
71 Returns a boolean indicating whether or not you can use this package to
72 create and install modules in your environment.
73
74 Sets up the "CPANPLUS::Dist::MM" object for use. Effectively creates
75 all the needed status accessors.
76
77 Called automatically whenever you create a new "CPANPLUS::Dist" object.
78
79 "prepare" preps a distribution for installation. This means it will run
80 "perl Makefile.PL" and determine what prerequisites this distribution
81 declared.
82
83 If you set "force" to true, it will go over all the stages of the
84 "prepare" process again, ignoring any previously cached results.
85
86 When running "perl Makefile.PL", the environment variable
87 "PERL5_CPANPLUS_IS_EXECUTING" will be set to the full path of the
88 "Makefile.PL" that is being executed. This enables any code inside the
89 "Makefile.PL" to know that it is being installed via CPANPLUS.
90
91 Returns true on success and false on failure.
92
93 You may then call "$dist->create" on the object to create the
94 installable files.
95
96 $href = $dist->_find_prereqs( file => '/path/to/Makefile', [verbose =>
97 BOOL])
98 Parses a "Makefile" for "PREREQ_PM" entries and distills from that any
99 prerequisites mentioned in the "Makefile"
100
101 Returns a hash with module-version pairs on success and false on
102 failure.
103
104 $bool = $dist->create([perl => '/path/to/perl', make => '/path/to/make',
105 makeflags => 'EXTRA=FLAGS', prereq_target => TARGET, skiptest => BOOL,
106 force => BOOL, verbose => BOOL])
107 "create" creates the files necessary for installation. This means it
108 will run "make" and "make test". This will also scan for and attempt
109 to satisfy any prerequisites the module may have.
110
111 If you set "skiptest" to true, it will skip the "make test" stage. If
112 you set "force" to true, it will go over all the stages of the "make"
113 process again, ignoring any previously cached results. It will also
114 ignore a bad return value from "make test" and still allow the
115 operation to return true.
116
117 Returns true on success and false on failure.
118
119 You may then call "$dist->install" on the object to actually install
120 it.
121
122 $bool = $dist->install([make => '/path/to/make', makemakerflags =>
123 'EXTRA=FLAGS', force => BOOL, verbose => BOOL])
124 "install" runs the following command:
125 make install
126
127 Returns true on success, false on failure.
128
129 $bool = $dist->write_makefile_pl([force => BOOL, verbose => BOOL])
130 This routine can write a "Makefile.PL" from the information in a module
131 object. It is used to write a "Makefile.PL" when the original author
132 forgot it (!!).
133
134 Returns 1 on success and false on failure.
135
136 The file gets written to the directory the module's been extracted to.
137
138
139
140perl v5.12.4 2011-06-07 CPANPLUS::Dist::MM(3pm)