1CPANPLUS::Dist(3) User Contributed Perl Documentation CPANPLUS::Dist(3)
2
3
4
6 CPANPLUS::Dist - base class for plugins
7
9 my $dist = CPANPLUS::Dist::YOUR_DIST_TYPE_HERE->new(
10 module => $modobj,
11 );
12
14 "CPANPLUS::Dist" is a base class for "CPANPLUS::Dist::MM" and
15 "CPANPLUS::Dist::Build". Developers of other "CPANPLUS::Dist::*"
16 plugins should look at "CPANPLUS::Dist::Base".
17
19 parent()
20 Returns the "CPANPLUS::Module" object that parented this object.
21
22 status()
23 Returns the "Object::Accessor" object that keeps the status for
24 this module.
25
27 All accessors can be accessed as follows:
28 $deb->status->ACCESSOR
29
30 created()
31 Boolean indicating whether the dist was created successfully.
32 Explicitly set to 0 when failed, so a value of "undef" may be
33 interpreted as "not yet attempted".
34
35 installed()
36 Boolean indicating whether the dist was installed successfully.
37 Explicitly set to 0 when failed, so a value of "undef" may be
38 interpreted as "not yet attempted".
39
40 uninstalled()
41 Boolean indicating whether the dist was uninstalled successfully.
42 Explicitly set to 0 when failed, so a value of "undef" may be
43 interpreted as "not yet attempted".
44
45 dist()
46 The location of the final distribution. This may be a file or
47 directory, depending on how your distribution plug in of choice
48 works. This will be set upon a successful create.
49
50 $dist = CPANPLUS::Dist::YOUR_DIST_TYPE_HERE->new( module => MODOBJ );
51 Create a new "CPANPLUS::Dist::YOUR_DIST_TYPE_HERE" object based on the
52 provided "MODOBJ".
53
54 *** DEPRECATED *** The optional argument "format" is used to indicate
55 what type of dist you would like to create (like "CPANPLUS::Dist::MM"
56 or "CPANPLUS::Dist::Build" and so on ).
57
58 "CPANPLUS::Dist->new" is exclusively meant as a method to be inherited
59 by "CPANPLUS::Dist::MM|Build".
60
61 Returns a "CPANPLUS::Dist::YOUR_DIST_TYPE_HERE" object on success and
62 false on failure.
63
64 @dists = CPANPLUS::Dist->dist_types;
65 Returns a list of the CPANPLUS::Dist::* classes available
66
67 $bool = CPANPLUS::Dist->rescan_dist_types;
68 Rescans @INC for available dist types. Useful if you've installed new
69 "CPANPLUS::Dist::*" classes and want to make them available to the
70 current process.
71
72 $bool = CPANPLUS::Dist->has_dist_type( $type )
73 Returns true if distribution type $type is loaded/supported.
74
75 $bool = $dist->prereq_satisfied( modobj => $modobj, version =>
76 $version_spec )
77 Returns true if this prereq is satisfied. Returns false if it's not.
78 Also issues an error if it seems "unsatisfiable," i.e. if it can't be
79 found on CPAN or the latest CPAN version doesn't satisfy it.
80
81 $configure_requires = $dist->find_configure_requires( [file =>
82 /path/to/META.yml] )
83 Reads the configure_requires for this distribution from the META.yml or
84 META.json file in the root directory and returns a hashref with module
85 names and versions required.
86
87 $bool = $dist->_resolve_prereqs( ... )
88 Makes sure prerequisites are resolved
89
90 format The dist class to use to make the prereqs
91 (ie. CPANPLUS::Dist::MM)
92
93 prereqs Hash of the prerequisite modules and their versions
94
95 target What to do with the prereqs.
96 create => Just build them
97 install => Install them
98 ignore => Ignore them
99
100 prereq_build If true, always build the prereqs even if already
101 resolved
102
103 verbose Be verbose
104
105 force Force the prereq to be built, even if already resolved
106
107
108
109perl v5.30.2 2020-04-14 CPANPLUS::Dist(3)