Edit D:\app\Administrator\product\11.2.0\dbhome_1\perl\html\lib\CPANPLUS\Internals\Source.html
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>../lib/CPANPLUS/Internals/Source.pm</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:" /> </head> <body style="background-color: white"> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> ../lib/CPANPLUS/Internals/Source.pm</span></strong></big> </td></tr> </table> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#methods">METHODS</a></li> <ul> <li><a href="#_cb___check_trees___update_source____bool__path____path__verbose____bool___">$cb->_check_trees( [update_source => BOOL, path => PATH, verbose => BOOL] )</a></li> <li><a href="#_cb____check_uptodate__file_____file__name_____name___update_source____bool__verbose____bool___">$cb->__check_uptodate( file => $file, name => $name, [update_source => BOOL, verbose => BOOL] )</a></li> <li><a href="#_cb___update_source__name_____name___path_____path__verbose____bool___">$cb->_update_source( name => $name, [path => $path, verbose => BOOL] )</a></li> <li><a href="#_cb___build_trees__uptodate____bool___use_stored____bool__path_____path__verbose____bool___">$cb->_build_trees( uptodate => BOOL, [use_stored => BOOL, path => $path, verbose => BOOL] )</a></li> <li><a href="#_cb____retrieve_source_name_____name___path_____path__uptodate____bool__verbose____bool__">$cb->__retrieve_source(name => $name, [path => $path, uptodate => BOOL, verbose => BOOL])</a></li> <li><a href="#_cb___save_source__verbose____bool__path_____path__">$cb->_save_source([verbose => BOOL, path => $path])</a></li> <li><a href="#_cb____create_author_tree__path_____path__uptodate____bool__verbose____bool__">$cb->__create_author_tree([path => $path, uptodate => BOOL, verbose => BOOL])</a></li> <li><a href="#_cb___create_mod_tree__path_____path__uptodate____bool__verbose____bool__">$cb->_create_mod_tree([path => $path, uptodate => BOOL, verbose => BOOL])</a></li> <li><a href="#_cb____create_dslip_tree__path_____path__uptodate____bool__verbose____bool__">$cb->__create_dslip_tree([path => $path, uptodate => BOOL, verbose => BOOL])</a></li> <li><a href="#_cb___dslip_defs___">$cb->_dslip_defs ()</a></li> <li><a href="#_file____cb___add_custom_module_source__uri____uri___verbose____bool____">$file = $cb->_add_custom_module_source( uri => URI, [verbose => BOOL] );</a></li> <li><a href="#_index____cb____custom_module_source_index_file__uri_____uri___">$index = $cb->__custom_module_source_index_file( uri => $uri );</a></li> <li><a href="#_file____cb___remove_custom_module_source__uri____uri___verbose____bool____">$file = $cb->_remove_custom_module_source( uri => URI, [verbose => BOOL] );</a></li> <li><a href="#_files____cb____list_custom_module_sources">%files = $cb->__list_custom_module_sources</a></li> <li><a href="#_bool____cb____update_custom_module_sources___verbose____bool____">$bool = $cb->__update_custom_module_sources( [verbose => BOOL] );</a></li> <li><a href="#_ok____cb____update_custom_module_source">$ok = $cb->__update_custom_module_source</a></li> <li><a href="#_bool____cb____write_custom_module_index__path_____path_to_packages___to_____path_to_index_file__verbose____bool___">$bool = $cb->__write_custom_module_index( path => /path/to/packages, [to => /path/to/index/file, verbose => BOOL] )</a></li> <li><a href="#_bool____cb____create_custom_module_entries___verbose____bool___">$bool = $cb->__create_custom_module_entries( [verbose => BOOL] )</a></li> </ul> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <hr /> <h1><a name="name">NAME</a></h1> <p>CPANPLUS::Internals::Source</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> ### lazy load author/module trees ###</pre> <pre> $cb->_author_tree; $cb->_module_tree;</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>CPANPLUS::Internals::Source controls the updating of source files and the parsing of them into usable module/author trees to be used by <code>CPANPLUS</code>.</p> <p>Functions exist to check if source files are still <code>good to use</code> as well as update them, and then parse them.</p> <p>The flow looks like this:</p> <pre> $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 $cb->__create_author_tree $cb->__retrieve_source $cb->__create_module_tree $cb->__retrieve_source $cb->__create_dslip_tree $cb->__retrieve_source $cb->__create_custom_module_entries $cb->_save_source</pre> <pre> $cb->_dslip_defs</pre> <p> </p> <hr /> <h1><a name="methods">METHODS</a></h1> <p> </p> <h2><a name="_cb___check_trees___update_source____bool__path____path__verbose____bool___">$cb->_check_trees( [update_source => BOOL, path => PATH, verbose => BOOL] )</a></h2> <p>Retrieve source files and return a boolean indicating whether or not the source files are up to date.</p> <p>Takes several arguments:</p> <dl> <dt><strong><a name="update_source" class="item">update_source</a></strong> <dd> <p>A flag to force re-fetching of the source files, even if they are still up to date.</p> </dd> </li> <dt><strong><a name="path" class="item">path</a></strong> <dd> <p>The absolute path to the directory holding the source files.</p> </dd> </li> <dt><strong><a name="verbose" class="item">verbose</a></strong> <dd> <p>A boolean flag indicating whether or not to be verbose.</p> </dd> </li> </dl> <p>Will get information from the config file by default.</p> <p> </p> <h2><a name="_cb____check_uptodate__file_____file__name_____name___update_source____bool__verbose____bool___">$cb->__check_uptodate( file => $file, name => $name, [update_source => BOOL, verbose => BOOL] )</a></h2> <p><code>__check_uptodate</code> checks if a given source file is still up-to-date and if not, or when <a href="#update_source"><code>update_source</code></a> is true, will re-fetch the source file.</p> <p>Takes the following arguments:</p> <dl> <dt><strong><a name="file" class="item">file</a></strong> <dd> <p>The source file to check.</p> </dd> </li> <dt><strong><a name="name" class="item">name</a></strong> <dd> <p>The internal shortcut name for the source file (used for config lookups).</p> </dd> </li> <dt><strong>update_source</strong> <dd> <p>Flag to force updating of sourcefiles regardless.</p> </dd> </li> <dt><strong>verbose</strong> <dd> <p>Boolean to indicate whether to be verbose or not.</p> </dd> </li> </dl> <p>Returns a boolean value indicating whether the current files are up to date or not.</p> <p> </p> <h2><a name="_cb___update_source__name_____name___path_____path__verbose____bool___">$cb->_update_source( name => $name, [path => $path, verbose => BOOL] )</a></h2> <p>This method does the actual fetching of source files.</p> <p>It takes the following arguments:</p> <dl> <dt><strong>name</strong> <dd> <p>The internal shortcut name for the source file (used for config lookups).</p> </dd> </li> <dt><strong>path</strong> <dd> <p>The full path where to write the files.</p> </dd> </li> <dt><strong>verbose</strong> <dd> <p>Boolean to indicate whether to be verbose or not.</p> </dd> </li> </dl> <p>Returns a boolean to indicate success.</p> <p> </p> <h2><a name="_cb___build_trees__uptodate____bool___use_stored____bool__path_____path__verbose____bool___">$cb->_build_trees( uptodate => BOOL, [use_stored => BOOL, path => $path, verbose => BOOL] )</a></h2> <p>This method rebuilds the author- and module-trees from source.</p> <p>It takes the following arguments:</p> <dl> <dt><strong><a name="uptodate" class="item">uptodate</a></strong> <dd> <p>Indicates whether any on disk caches are still ok to use.</p> </dd> </li> <dt><strong>path</strong> <dd> <p>The absolute path to the directory holding the source files.</p> </dd> </li> <dt><strong>verbose</strong> <dd> <p>A boolean flag indicating whether or not to be verbose.</p> </dd> </li> <dt><strong><a name="use_stored" class="item">use_stored</a></strong> <dd> <p>A boolean flag indicating whether or not it is ok to use previously stored trees. Defaults to true.</p> </dd> </li> </dl> <p>Returns a boolean indicating success.</p> <p> </p> <h2><a name="_cb____retrieve_source_name_____name___path_____path__uptodate____bool__verbose____bool__">$cb->__retrieve_source(name => $name, [path => $path, uptodate => BOOL, verbose => BOOL])</a></h2> <p>This method retrieves a <em>storable</em>d tree identified by <code>$name</code>.</p> <p>It takes the following arguments:</p> <dl> <dt><strong>name</strong> <dd> <p>The internal name for the source file to retrieve.</p> </dd> </li> <dt><strong>uptodate</strong> <dd> <p>A flag indicating whether the file-cache is up-to-date or not.</p> </dd> </li> <dt><strong>path</strong> <dd> <p>The absolute path to the directory holding the source files.</p> </dd> </li> <dt><strong>verbose</strong> <dd> <p>A boolean flag indicating whether or not to be verbose.</p> </dd> </li> </dl> <p>Will get information from the config file by default.</p> <p>Returns a tree on success, false on failure.</p> <p> </p> <h2><a name="_cb___save_source__verbose____bool__path_____path__">$cb->_save_source([verbose => BOOL, path => $path])</a></h2> <p>This method saves all the parsed trees in <em>storable</em>d format if <code>Storable</code> is available.</p> <p>It takes the following arguments:</p> <dl> <dt><strong>path</strong> <dd> <p>The absolute path to the directory holding the source files.</p> </dd> </li> <dt><strong>verbose</strong> <dd> <p>A boolean flag indicating whether or not to be verbose.</p> </dd> </li> </dl> <p>Will get information from the config file by default.</p> <p>Returns true on success, false on failure.</p> <p> </p> <h2><a name="_cb____create_author_tree__path_____path__uptodate____bool__verbose____bool__">$cb->__create_author_tree([path => $path, uptodate => BOOL, verbose => BOOL])</a></h2> <p>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.</p> <p>It takes the following arguments:</p> <dl> <dt><strong>uptodate</strong> <dd> <p>A flag indicating whether the file-cache is uptodate or not.</p> </dd> </li> <dt><strong>path</strong> <dd> <p>The absolute path to the directory holding the source files.</p> </dd> </li> <dt><strong>verbose</strong> <dd> <p>A boolean flag indicating whether or not to be verbose.</p> </dd> </li> </dl> <p>Will get information from the config file by default.</p> <p>Returns a tree on success, false on failure.</p> <p> </p> <h2><a name="_cb___create_mod_tree__path_____path__uptodate____bool__verbose____bool__">$cb->_create_mod_tree([path => $path, uptodate => BOOL, verbose => BOOL])</a></h2> <p>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.</p> <p>It takes the following arguments:</p> <dl> <dt><strong>uptodate</strong> <dd> <p>A flag indicating whether the file-cache is up-to-date or not.</p> </dd> </li> <dt><strong>path</strong> <dd> <p>The absolute path to the directory holding the source files.</p> </dd> </li> <dt><strong>verbose</strong> <dd> <p>A boolean flag indicating whether or not to be verbose.</p> </dd> </li> </dl> <p>Will get information from the config file by default.</p> <p>Returns a tree on success, false on failure.</p> <p> </p> <h2><a name="_cb____create_dslip_tree__path_____path__uptodate____bool__verbose____bool__">$cb->__create_dslip_tree([path => $path, uptodate => BOOL, verbose => BOOL])</a></h2> <p>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.</p> <p>It takes the following arguments:</p> <dl> <dt><strong>uptodate</strong> <dd> <p>A flag indicating whether the file-cache is uptodate or not.</p> </dd> </li> <dt><strong>path</strong> <dd> <p>The absolute path to the directory holding the source files.</p> </dd> </li> <dt><strong>verbose</strong> <dd> <p>A boolean flag indicating whether or not to be verbose.</p> </dd> </li> </dl> <p>Will get information from the config file by default.</p> <p>Returns a tree on success, false on failure.</p> <p> </p> <h2><a name="_cb___dslip_defs___">$cb->_dslip_defs ()</a></h2> <p>This function returns the definition structure (ARRAYREF) of the dslip tree.</p> <p> </p> <h2><a name="_file____cb___add_custom_module_source__uri____uri___verbose____bool____">$file = $cb->_add_custom_module_source( uri => URI, [verbose => BOOL] );</a></h2> <p>Adds a custom source index and updates it based on the provided URI.</p> <p>Returns the full path to the index file on success or false on failure.</p> <p> </p> <h2><a name="_index____cb____custom_module_source_index_file__uri_____uri___">$index = $cb->__custom_module_source_index_file( uri => $uri );</a></h2> <p>Returns the full path to the encoded index file for <code>$uri</code>, as used by all <code>custom module source</code> routines.</p> <p> </p> <h2><a name="_file____cb___remove_custom_module_source__uri____uri___verbose____bool____">$file = $cb->_remove_custom_module_source( uri => URI, [verbose => BOOL] );</a></h2> <p>Removes a custom index file based on the URI provided.</p> <p>Returns the full path to the index file on success or false on failure.</p> <p> </p> <h2><a name="_files____cb____list_custom_module_sources">%files = $cb->__list_custom_module_sources</a></h2> <p>This method scans the 'custom-sources' directory in your base directory for additional sources to include in your module tree.</p> <p>Returns a list of key value pairs as follows:</p> <pre> /full/path/to/source/file%3Fencoded => <a href="http://decoded/mirror/path">http://decoded/mirror/path</a></pre> <p> </p> <h2><a name="_bool____cb____update_custom_module_sources___verbose____bool____">$bool = $cb->__update_custom_module_sources( [verbose => BOOL] );</a></h2> <p>Attempts to update all the index files to your custom module sources.</p> <p>If the index is missing, and it's a <a href="#file"><code>file://</code></a> uri, it will generate a new local index for you.</p> <p>Return true on success, false on failure.</p> <p> </p> <h2><a name="_ok____cb____update_custom_module_source">$ok = $cb->__update_custom_module_source</a></h2> <p>Attempts to update all the index files to your custom module sources.</p> <p>If the index is missing, and it's a <a href="#file"><code>file://</code></a> uri, it will generate a new local index for you.</p> <p>Return true on success, false on failure.</p> <p> </p> <h2><a name="_bool____cb____write_custom_module_index__path_____path_to_packages___to_____path_to_index_file__verbose____bool___">$bool = $cb->__write_custom_module_index( path => /path/to/packages, [to => /path/to/index/file, verbose => BOOL] )</a></h2> <p>Scans the <a href="#path"><code>path</code></a> you provided for packages and writes an index with all the available packages to <code>$path/packages.txt</code>. If you'd like the index to be written to a different file, provide the <code>to</code> argument.</p> <p>Returns true on success and false on failure.</p> <p> </p> <h2><a name="_bool____cb____create_custom_module_entries___verbose____bool___">$bool = $cb->__create_custom_module_entries( [verbose => BOOL] )</a></h2> <p>Creates entries in the module tree based upon the files as returned by <code>__list_custom_module_sources</code>.</p> <p>Returns true on success, false on failure.</p> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> ../lib/CPANPLUS/Internals/Source.pm</span></strong></big> </td></tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de