1CPANPLUS::Internals::SoUusrecre(C3o)ntributed Perl DocumCePnAtNaPtLiUoSn::Internals::Source(3)
2
3
4

NAME

6       CPANPLUS::Internals::Source
7

SYNOPSIS

9           ### lazy load author/module trees ###
10
11           $cb->_author_tree;
12           $cb->_module_tree;
13

DESCRIPTION

15       CPANPLUS::Internals::Source controls the updating of source files and
16       the parsing of them into usable module/author trees to be used by
17       "CPANPLUS".
18
19       Functions exist to check if source files are still "good to use" as
20       well as update them, and then parse them.
21
22       The flow looks like this:
23
24           $cb->_author_tree ⎪⎪ $cb->_module_tree
25               $cb->__check_trees
26                   $cb->__check_uptodate
27                       $cb->_update_source
28               $cb->_build_trees
29                   $cb->__create_author_tree
30                       $cb->__retrieve_source
31                   $cb->__create_module_tree
32                       $cb->__retrieve_source
33                       $cb->__create_dslip_tree
34                           $cb->__retrieve_source
35                   $cb->_save_source
36
37           $cb->_dslip_defs
38

METHODS

40       $cb->_check_trees( [update_source => BOOL, path => PATH, verbose =>
41       BOOL] )
42
43       Retrieve source files and return a boolean indicating whether or not
44       the source files are up to date.
45
46       Takes several arguments:
47
48       update_source
49           A flag to force re-fetching of the source files, even if they are
50           still up to date.
51
52       path
53           The absolute path to the directory holding the source files.
54
55       verbose
56           A boolean flag indicating whether or not to be verbose.
57
58       Will get information from the config file by default.
59
60       $cb->__check_uptodate( file => $file, name => $name, [update_source =>
61       BOOL, verbose => BOOL] )
62
63       "__check_uptodate" checks if a given source file is still up-to-date
64       and if not, or when "update_source" is true, will re-fetch the source
65       file.
66
67       Takes the following arguments:
68
69       file
70           The source file to check.
71
72       name
73           The internal shortcut name for the source file (used for config
74           lookups).
75
76       update_source
77           Flag to force updating of sourcefiles regardless.
78
79       verbose
80           Boolean to indicate whether to be verbose or not.
81
82       Returns a boolean value indicating whether the current files are up to
83       date or not.
84
85       $cb->_update_source( name => $name, [path => $path, verbose => BOOL] )
86
87       This method does the actual fetching of source files.
88
89       It takes the following arguments:
90
91       name
92           The internal shortcut name for the source file (used for config
93           lookups).
94
95       path
96           The full path where to write the files.
97
98       verbose
99           Boolean to indicate whether to be verbose or not.
100
101       Returns a boolean to indicate success.
102
103       $cb->_build_trees( uptodate => BOOL, [use_stored => BOOL, path =>
104       $path, verbose => BOOL] )
105
106       This method rebuilds the author- and module-trees from source.
107
108       It takes the following arguments:
109
110       uptodate
111           Indicates whether any on disk caches are still ok to use.
112
113       path
114           The absolute path to the directory holding the source files.
115
116       verbose
117           A boolean flag indicating whether or not to be verbose.
118
119       use_stored
120           A boolean flag indicating whether or not it is ok to use previously
121           stored trees. Defaults to true.
122
123       Returns a boolean indicating success.
124
125       $cb->__retrieve_source(name => $name, [path => $path, uptodate => BOOL,
126       verbose => BOOL])
127
128       This method retrieves a storabled tree identified by $name.
129
130       It takes the following arguments:
131
132       name
133           The internal name for the source file to retrieve.
134
135       uptodate
136           A flag indicating whether the file-cache is up-to-date or not.
137
138       path
139           The absolute path to the directory holding the source files.
140
141       verbose
142           A boolean flag indicating whether or not to be verbose.
143
144       Will get information from the config file by default.
145
146       Returns a tree on success, false on failure.
147
148       $cb->_save_source([verbose => BOOL, path => $path])
149
150       This method saves all the parsed trees in storabled format if
151       "Storable" is available.
152
153       It takes the following arguments:
154
155       path
156           The absolute path to the directory holding the source files.
157
158       verbose
159           A boolean flag indicating whether or not to be verbose.
160
161       Will get information from the config file by default.
162
163       Returns true on success, false on failure.
164
165       $cb->__create_author_tree([path => $path, uptodate => BOOL, verbose =>
166       BOOL])
167
168       This method opens a source files and parses its contents into a search‐
169       able author-tree or restores a file-cached version of a previous parse,
170       if the sources are uptodate and the file-cache exists.
171
172       It takes the following arguments:
173
174       uptodate
175           A flag indicating whether the file-cache is uptodate or not.
176
177       path
178           The absolute path to the directory holding the source files.
179
180       verbose
181           A boolean flag indicating whether or not to be verbose.
182
183       Will get information from the config file by default.
184
185       Returns a tree on success, false on failure.
186
187       $cb->_create_mod_tree([path => $path, uptodate => BOOL, verbose =>
188       BOOL])
189
190       This method opens a source files and parses its contents into a search‐
191       able module-tree or restores a file-cached version of a previous parse,
192       if the sources are uptodate and the file-cache exists.
193
194       It takes the following arguments:
195
196       uptodate
197           A flag indicating whether the file-cache is up-to-date or not.
198
199       path
200           The absolute path to the directory holding the source files.
201
202       verbose
203           A boolean flag indicating whether or not to be verbose.
204
205       Will get information from the config file by default.
206
207       Returns a tree on success, false on failure.
208
209       $cb->__create_dslip_tree([path => $path, uptodate => BOOL, verbose =>
210       BOOL])
211
212       This method opens a source files and parses its contents into a search‐
213       able dslip-tree or restores a file-cached version of a previous parse,
214       if the sources are uptodate and the file-cache exists.
215
216       It takes the following arguments:
217
218       uptodate
219           A flag indicating whether the file-cache is uptodate or not.
220
221       path
222           The absolute path to the directory holding the source files.
223
224       verbose
225           A boolean flag indicating whether or not to be verbose.
226
227       Will get information from the config file by default.
228
229       Returns a tree on success, false on failure.
230
231       $cb->_dslip_defs ()
232
233       This function returns the definition structure (ARRAYREF) of the dslip
234       tree.
235
236
237
238perl v5.8.8                       2007-03-31    CPANPLUS::Internals::Source(3)
Impressum