CPANPLUS::Internals::Source - internals for updating source files |
CPANPLUS::Internals::Source - internals for updating source files
### lazy load author/module trees ###
$cb->_author_tree; $cb->_module_tree;
CPANPLUS::Internals::Source controls the updating of source files and
the parsing of them into usable module/author trees to be used by
CPANPLUS
.
Functions exist to check if source files are still good to use
as
well as update them, and then parse them.
The flow looks like this:
$cb->_author_tree || $cb->_module_tree $cb->_check_trees $cb->__check_uptodate $cb->_update_source $cb->__update_custom_module_sources $cb->__update_custom_module_source $cb->_build_trees ### engine methods { $cb->_init_trees; $cb->_standard_trees_completed $cb->_custom_trees_completed } $cb->__create_author_tree ### engine methods { $cb->_add_author_object } $cb->__create_module_tree $cb->__create_dslip_tree ### engine methods { $cb->_add_module_object } $cb->__create_custom_module_entries
$cb->_dslip_defs
This method rebuilds the author- and module-trees from source.
It takes the following arguments:
Returns a boolean indicating success.
Retrieve source files and return a boolean indicating whether or not the source files are up to date.
Takes several arguments:
Will get information from the config file by default.
__check_uptodate
checks if a given source file is still up-to-date
and if not, or when update_source
is true, will re-fetch the source
file.
Takes the following arguments:
Returns a boolean value indicating whether the current files are up to date or not.
This method does the actual fetching of source files.
It takes the following arguments:
Returns a boolean to indicate success.
This method opens a source files and parses its contents into a searchable author-tree or restores a file-cached version of a previous parse, if the sources are uptodate and the file-cache exists.
It takes the following arguments:
Will get information from the config file by default.
Returns a tree on success, false on failure.
This method opens a source files and parses its contents into a searchable module-tree or restores a file-cached version of a previous parse, if the sources are uptodate and the file-cache exists.
It takes the following arguments:
Will get information from the config file by default.
Returns a tree on success, false on failure.
This method opens a source files and parses its contents into a searchable dslip-tree or restores a file-cached version of a previous parse, if the sources are uptodate and the file-cache exists.
It takes the following arguments:
Will get information from the config file by default.
Returns a tree on success, false on failure.
This function returns the definition structure (ARRAYREF) of the dslip tree.
Adds a custom source index and updates it based on the provided URI.
Returns the full path to the index file on success or false on failure.
Returns the full path to the encoded index file for $uri
, as used by
all custom module source
routines.
Removes a custom index file based on the URI provided.
Returns the full path to the index file on success or false on failure.
This method scans the 'custom-sources' directory in your base directory for additional sources to include in your module tree.
Returns a list of key value pairs as follows:
/full/path/to/source/file%3Fencoded => http://decoded/mirror/path
Attempts to update all the index files to your custom module sources.
If the index is missing, and it's a file://
uri, it will generate
a new local index for you.
Return true on success, false on failure.
Attempts to update all the index files to your custom module sources.
If the index is missing, and it's a file://
uri, it will generate
a new local index for you.
Return true on success, false on failure.
Scans the path
you provided for packages and writes an index with all
the available packages to $path/packages.txt
. If you'd like the index
to be written to a different file, provide the to
argument.
Returns true on success and false on failure.
Creates entries in the module tree based upon the files as returned
by __list_custom_module_sources
.
Returns true on success, false on failure.
CPANPLUS::Internals::Source - internals for updating source files |