1CPANPLUS::Internals(3)User Contributed Perl DocumentationCPANPLUS::Internals(3)
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 mod‐
14 ules in the CPANPLUS::Internals::* namespace, thus defying normal rules
15 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
26 _lib
27 Get/set the current @INC path -- @INC is reset to this after each
28 install.
29
30 _perl5lib
31 Get/set the current PERL5LIB environment variable -- $ENV{PERL5LIB}
32 is reset to this after each install.
33
35 $internals = CPANPLUS::Internals->_init( _conf => CONFIG_OBJ )
36
37 "_init" creates a new CPANPLUS::Internals object.
38
39 You have to pass it a valid "CPANPLUS::Configure" object.
40
41 Returns the object on success, or dies on failure.
42
43 $bool = $internals->_flush( list => \@caches )
44
45 Flushes the designated caches from the "CPANPLUS" object.
46
47 Returns true on success, false if one or more caches could not be be
48 flushed.
49
50 $bool = $internals->_register_callback( name => CALLBACK_NAME, code =>
51 CODEREF );
52
53 Registers a callback for later use by the internal libraries.
54
55 Here is a list of the currently used callbacks:
56
57 install_prerequisite
58 Is called when the user wants to be "asked" about what to do
59 with prerequisites. Should return a boolean indicating true to
60 install the prerequisite and false to skip it.
61
62 send_test_report
63 Is called when the user should be prompted if he wishes to send
64 the test report. Should return a boolean indicating true to
65 send the test report and false to skip it.
66
67 munge_test_report
68 Is called when the test report message has been composed, giv‐
69 ing the user a chance to programatically alter it. Should
70 return the (munged) message to be sent.
71
72 edit_test_report
73 Is called when the user should be prompted to edit test reports
74 about to be sent out by Test::Reporter. Should return a boolean
75 indicating true to edit the test report in an editor and false
76 to skip it.
77
78 $bool = $internals->_add_to_includepath( directories => \@dirs )
79
80 Adds a list of directories to the include path. This means they
81 get added to @INC as well as $ENV{PERL5LIB}.
82
83 Returns true on success, false on failure.
84
85 $id = CPANPLUS::Internals->_last_id
86
87 Return the id of the last object stored.
88
89 $id = CPANPLUS::Internals->_store_id( $internals )
90
91 Store this object; return its id.
92
93 $obj = CPANPLUS::Internals->_retrieve_id( $ID )
94
95 Retrieve an object based on its ID -- return false on error.
96
97 CPANPLUS::Internals->_remove_id( $ID )
98
99 Remove the object marked by $ID from storage.
100
101 @objs = CPANPLUS::Internals->_return_all_objects
102
103 Return all stored objects.
104
105
106
107perl v5.8.8 2007-03-31 CPANPLUS::Internals(3)