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

NAME

6       CPANPLUS::Dist::MM - distribution class for MakeMaker related modules
7

SYNOPSIS

9           $mm = CPANPLUS::Dist::MM->new( module => $modobj );
10
11           $mm->create;        # runs make && make test
12           $mm->install;       # runs make install
13

DESCRIPTION

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

ACCESSORS

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

STATUS ACCESSORS

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 successfully 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 successfully. 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

METHODS

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   $bool = $dist->init();
75       Sets up the "CPANPLUS::Dist::MM" object for use.  Effectively creates
76       all the needed status accessors.
77
78       Called automatically whenever you create a new "CPANPLUS::Dist" object.
79
80   $bool = $dist->prepare([perl => '/path/to/perl', makemakerflags =>
81       'EXTRA=FLAGS', force => BOOL, verbose => BOOL])
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
87       "prepare" process again, ignoring any previously cached results.
88
89       When running "perl Makefile.PL", the environment variable
90       "PERL5_CPANPLUS_IS_EXECUTING" will be set to the full path of the
91       "Makefile.PL" that is being executed. This enables any code inside the
92       "Makefile.PL" 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
97       installable files.
98
99   $href = $dist->_find_prereqs( file => '/path/to/Makefile', [verbose =>
100       BOOL])
101       Parses a "Makefile" for "PREREQ_PM" entries and distills from that any
102       prerequisites mentioned in the "Makefile"
103
104       Returns a hash with module-version pairs on success and false on
105       failure.
106
107   $bool = $dist->create([perl => '/path/to/perl', make => '/path/to/make',
108       makeflags => 'EXTRA=FLAGS', prereq_target => TARGET, skiptest => BOOL,
109       force => BOOL, verbose => BOOL])
110       "create" creates the files necessary for installation. This means it
111       will run "make" and "make test".  This will also scan for and attempt
112       to satisfy any prerequisites the module may have.
113
114       If you set "skiptest" to true, it will skip the "make test" stage.  If
115       you set "force" to true, it will go over all the stages of the "make"
116       process again, ignoring any previously cached results. It will also
117       ignore a bad return value from "make test" and still allow the
118       operation to return true.
119
120       Returns true on success and false on failure.
121
122       You may then call "$dist->install" on the object to actually install
123       it.
124
125   $bool = $dist->install([make => '/path/to/make',  makemakerflags =>
126       'EXTRA=FLAGS', force => BOOL, verbose => BOOL])
127       "install" runs the following command:
128           make install
129
130       Returns true on success, false on failure.
131
132   $bool = $dist->write_makefile_pl([force => BOOL, verbose => BOOL])
133       This routine can write a "Makefile.PL" from the information in a module
134       object. It is used to write a "Makefile.PL" when the original author
135       forgot it (!!).
136
137       Returns 1 on success and false on failure.
138
139       The file gets written to the directory the module's been extracted to.
140
141
142
143perl v5.34.0                      2021-08-23             CPANPLUS::Dist::MM(3)
Impressum