1CPANPLUS::Dist::Build(3U)ser Contributed Perl DocumentatiCoPnANPLUS::Dist::Build(3)
2
3
4
6 CPANPLUS::Dist::Build - CPANPLUS plugin to install packages that use
7 Build.PL
8
10 my $build = CPANPLUS::Dist->new(
11 format => 'CPANPLUS::Dist::Build',
12 module => $modobj,
13 );
14
15 $build->prepare; # runs Build.PL
16 $build->create; # runs build && build test
17 $build->install; # runs build install
18
20 "CPANPLUS::Dist::Build" is a distribution class for "Module::Build"
21 related modules. Using this package, you can create, install and
22 uninstall perl modules. It inherits from "CPANPLUS::Dist".
23
24 Normal users won't have to worry about the interface to this module, as
25 it functions transparently as a plug-in to "CPANPLUS" and will just "Do
26 The Right Thing" when it's loaded.
27
29 "parent()"
30 Returns the "CPANPLUS::Module" object that parented this object.
31
32 "status()"
33 Returns the "Object::Accessor" object that keeps the status for
34 this module.
35
37 All accessors can be accessed as follows:
38 $build->status->ACCESSOR
39
40 "build_pl ()"
41 Location of the Build file. Set to 0 explicitly if something went
42 wrong.
43
44 "build ()"
45 BOOL indicating if the "Build" command was successful.
46
47 "test ()"
48 BOOL indicating if the "Build test" command was successful.
49
50 "prepared ()"
51 BOOL indicating if the "prepare" call exited successfully This gets
52 set after "perl Build.PL"
53
54 "distdir ()"
55 Full path to the directory in which the "prepare" call took place,
56 set after a call to "prepare".
57
58 "created ()"
59 BOOL indicating if the "create" call exited successfully. This gets
60 set after "Build" and "Build test".
61
62 "installed ()"
63 BOOL indicating if the module was installed. This gets set after
64 "Build install" exits successfully.
65
66 uninstalled ()
67 BOOL indicating if the module was uninstalled properly.
68
69 "_create_args ()"
70 Storage of the arguments passed to "create" for this object. Used
71 for recursive calls when satisfying prerequisites.
72
73 "_install_args ()"
74 Storage of the arguments passed to "install" for this object. Used
75 for recursive calls when satisfying prerequisites.
76
78 $bool = CPANPLUS::Dist::Build->format_available();
79 Returns a boolean indicating whether or not you can use this package to
80 create and install modules in your environment.
81
82 $bool = $dist->init();
83 Sets up the "CPANPLUS::Dist::Build" object for use. Effectively
84 creates all the needed status accessors.
85
86 Called automatically whenever you create a new "CPANPLUS::Dist" object.
87
88 $bool = $dist->prepare([perl => '/path/to/perl', buildflags =>
89 'EXTRA=FLAGS', force => BOOL, verbose => BOOL])
90 "prepare" prepares a distribution, running "Build.PL" and establishing
91 any prerequisites this distribution has.
92
93 The variable "PERL5_CPANPLUS_IS_EXECUTING" will be set to the full path
94 of the "Build.PL" that is being executed. This enables any code inside
95 the "Build.PL" to know that it is being installed via CPANPLUS.
96
97 After a successful "prepare" you may call "create" to create the
98 distribution, followed by "install" to actually install it.
99
100 Returns true on success and false on failure.
101
102 $dist->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS',
103 prereq_target => TARGET, force => BOOL, verbose => BOOL, skiptest =>
104 BOOL])
105 "create" preps a distribution for installation. This means it will run
106 "Build" and "Build test". This will also satisfy any prerequisites the
107 module may have.
108
109 If you set "skiptest" to true, it will skip the "Build test" stage. If
110 you set "force" to true, it will go over all the stages of the "Build"
111 process again, ignoring any previously cached results. It will also
112 ignore a bad return value from "Build test" and still allow the
113 operation to return true.
114
115 Returns true on success and false on failure.
116
117 You may then call "$dist->install" on the object to actually install
118 it.
119
120 $dist->install([verbose => BOOL, perl => /path/to/perl])
121 Actually installs the created dist.
122
123 Returns true on success and false on failure.
124
126 Originally by Jos Boumans <kane@cpan.org>. Brought to working
127 condition by Ken Williams <kwilliams@cpan.org>.
128
129 Other hackery and currently maintained by Chris "BinGOs" Williams ( no
130 relation ). <bingos@cpan.org>.
131
133 The CPAN++ interface (of which this module is a part of) is copyright
134 (c) 2001, 2002, 2003, 2004, 2005 Jos Boumans <kane@cpan.org>. All
135 rights reserved.
136
137 This library is free software; you may redistribute and/or modify it
138 under the same terms as Perl itself.
139
140
141
142perl v5.16.3 2013-01-25 CPANPLUS::Dist::Build(3)