1CPANPLUS::Internals(3pm)Perl Programmers Reference GuideCPANPLUS::Internals(3pm)
2
3
4
6 CPANPLUS::Internals
7
9 my $internals = CPANPLUS::Internals->_init( _conf => $conf );
10 my $backend = CPANPLUS::Internals->_retrieve_id( $ID );
11
13 This module is the guts of CPANPLUS -- it inherits from all other
14 modules in the CPANPLUS::Internals::* namespace, thus defying normal
15 rules of OO programming -- but if you're reading this, you already know
16 what's going on ;)
17
18 Please read the "CPANPLUS::Backend" documentation for the normal API.
19
21 _conf
22 Get/set the configure object
23
24 _id Get/set the id
25
27 $internals = CPANPLUS::Internals->_init( _conf => CONFIG_OBJ )
28 "_init" creates a new CPANPLUS::Internals object.
29
30 You have to pass it a valid "CPANPLUS::Configure" object.
31
32 Returns the object on success, or dies on failure.
33
34 $bool = $internals->_flush( list => \@caches )
35 Flushes the designated caches from the "CPANPLUS" object.
36
37 Returns true on success, false if one or more caches could not be be
38 flushed.
39
40 $bool = $internals->_register_callback( name => CALLBACK_NAME, code =>
41 CODEREF );
42 Registers a callback for later use by the internal libraries.
43
44 Here is a list of the currently used callbacks:
45
46 install_prerequisite
47 Is called when the user wants to be "asked" about what to do with
48 prerequisites. Should return a boolean indicating true to install
49 the prerequisite and false to skip it.
50
51 send_test_report
52 Is called when the user should be prompted if he wishes to send the
53 test report. Should return a boolean indicating true to send the
54 test report and false to skip it.
55
56 munge_test_report
57 Is called when the test report message has been composed, giving
58 the user a chance to programatically alter it. Should return the
59 (munged) message to be sent.
60
61 edit_test_report
62 Is called when the user should be prompted to edit test reports
63 about to be sent out by Test::Reporter. Should return a boolean
64 indicating true to edit the test report in an editor and false to
65 skip it.
66
67 proceed_on_test_failure
68 Is called when 'make test' or 'Build test' fails. Should return a
69 boolean indicating whether the install should continue even if the
70 test failed.
71
72 munge_dist_metafile
73 Is called when the "CPANPLUS::Dist::*" metafile is created, like
74 "control" for "CPANPLUS::Dist::Deb", giving the user a chance to
75 programatically alter it. Should return the (munged) text to be
76 written to the metafile.
77
78 $bool = $internals->_add_to_includepath( directories => \@dirs )
79 Adds a list of directories to the include path. This means they get
80 added to @INC as well as $ENV{PERL5LIB}.
81
82 Returns true on success, false on failure.
83
84 $id = CPANPLUS::Internals->_last_id
85 Return the id of the last object stored.
86
87 $id = CPANPLUS::Internals->_store_id( $internals )
88 Store this object; return its id.
89
90 $obj = CPANPLUS::Internals->_retrieve_id( $ID )
91 Retrieve an object based on its ID -- return false on error.
92
93 CPANPLUS::Internals->_remove_id( $ID )
94 Remove the object marked by $ID from storage.
95
96 @objs = CPANPLUS::Internals->_return_all_objects
97 Return all stored objects.
98
99
100
101perl v5.10.1 2009-07-07 CPANPLUS::Internals(3pm)