1CPANPLUS::Dist::Build(3U)ser Contributed Perl DocumentatiCoPnANPLUS::Dist::Build(3)
2
3
4

NAME

6       CPANPLUS::Dist::Build
7

SYNOPSIS

9           my $build = CPANPLUS::Dist->new(
10                                       format  => 'CPANPLUS::Dist::Build',
11                                       module  => $modobj,
12                                   );
13
14           $build->prepare;    # runs Module::Build->new_from_context;
15           $build->create;     # runs build && build test
16           $build->install;    # runs build install
17

DESCRIPTION

19       "CPANPLUS::Dist::Build" is a distribution class for "Module::Build"
20       related modules.  Using this package, you can create, install and unin‐
21       stall perl modules. It inherits from "CPANPLUS::Dist".
22
23       Normal users won't have to worry about the interface to this module, as
24       it functions transparently as a plug-in to "CPANPLUS" and will just "Do
25       The Right Thing" when it's loaded.
26

ACCESSORS

28       parent()
29           Returns the "CPANPLUS::Module" object that parented this object.
30
31       status()
32           Returns the "Object::Accessor" object that keeps the status for
33           this module.
34

STATUS ACCESSORS

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

METHODS

81       $bool = CPANPLUS::Dist::Build->format_available();
82
83       Returns a boolean indicating whether or not you can use this package to
84       create and install modules in your environment.
85
86       $bool = $dist->init();
87
88       Sets up the "CPANPLUS::Dist::Build" object for use.  Effectively cre‐
89       ates all the needed status accessors.
90
91       Called automatically whenever you create a new "CPANPLUS::Dist" object.
92
93       $bool = $dist->prepare([perl => '/path/to/perl', buildflags =>
94       'EXTRA=FLAGS', force => BOOL, verbose => BOOL])
95
96       "prepare" prepares a distribution, running "Module::Build"'s
97       "new_from_context" method, and establishing any prerequisites this dis‐
98       tribution has.
99
100       When running "Module::Build->new_from_context", the environment vari‐
101       able "PERL5_CPANPLUS_IS_EXECUTING" will be set to the full path of the
102       "Build.PL" that is being executed. This enables any code inside the
103       "Build.PL" to know that it is being installed via CPANPLUS.
104
105       After a succcesfull "prepare" you may call "create" to create the dis‐
106       tribution, followed by "install" to actually install it.
107
108       Returns true on success and false on failure.
109
110       $dist->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS',
111       prereq_target => TARGET, force => BOOL, verbose => BOOL, skiptest =>
112       BOOL])
113
114       "create" preps a distribution for installation. This means it will run
115       "Build" and "Build test", via the "Module::Build" API.  This will also
116       satisfy any prerequisites the module may have.
117
118       If you set "skiptest" to true, it will skip the "Build test" stage.  If
119       you set "force" to true, it will go over all the stages of the "Build"
120       process again, ignoring any previously cached results. It will also
121       ignore a bad return value from "Build test" and still allow the opera‐
122       tion to return true.
123
124       Returns true on success and false on failure.
125
126       You may then call "$dist->install" on the object to actually install
127       it.
128
129       $dist->install([verbose => BOOL, perl => /path/to/perl])
130
131       Actually installs the created dist.
132
133       Returns true on success and false on failure.
134

KNOWN ISSUES

136       Below are some of the known issues with Module::Build, that we hope the
137       authors will resolve at some point, so we can make full use of Mod‐
138       ule::Build's power.  The number listed is the bug number on
139       "rt.cpan.org".
140
141       * Module::Build can not be upgraded using its own API (#13169)
142           This is due to the fact that the Build file insists on adding a
143           path to @INC which force the loading of the "not yet installed"
144           Module::Build when it shells out to run it's own build procedure:
145
146       * Module::Build does not provide access to install history (#9793)
147           "Module::Build" runs the create, test and install procedures in
148           it's own processes, but does not provide access to any diagnostic
149           messages of those processes. As an end result, we can not offer
150           these diagnostic messages when, for example, reporting automated
151           build failures to sites like "testers.cpan.org".
152

AUTHOR

154       Originally by Jos Boumans <kane@cpan.org>.  Brought to working condi‐
155       tion and currently maintained by Ken Williams <kwilliams@cpan.org>.
156
158       The CPAN++ interface (of which this module is a part of) is copyright
159       (c) 2001, 2002, 2003, 2004, 2005 Jos Boumans <kane@cpan.org>.  All
160       rights reserved.
161
162       This library is free software; you may redistribute and/or modify it
163       under the same terms as Perl itself.
164
165
166
167perl v5.8.8                       2007-03-11          CPANPLUS::Dist::Build(3)
Impressum