Edit D:\app\Administrator\product\11.2.0\dbhome_1\perl\html\lib\CPANPLUS\Internals\Fetch.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/Fetch.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/Fetch.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> <li><a href="#_path____fetch__module_____modobj___fetchdir______path_to_save_to___fetch_from_____scheme___path_to_fetch_from___verbose____bool__force____bool__prefer_bin____bool___">$path = _fetch( module => $modobj, [fetchdir => '/path/to/save/to', fetch_from => 'scheme://path/to/fetch/from', verbose => BOOL, force => BOOL, prefer_bin => BOOL] )</a></li> <ul> <li><a href="#_add_fail_host__host_____host_hashref__">_add_fail_host( host => $host_hashref )</a></li> <li><a href="#_host_ok__host_____host_hashref__">_host_ok( host => $host_hashref )</a></li> </ul> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <hr /> <h1><a name="name">NAME</a></h1> <p>CPANPLUS::Internals::Fetch</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> my $output = $cb->_fetch( module => $modobj, fetchdir => '/path/to/save/to', verbose => BOOL, force => BOOL, );</pre> <pre> $cb->_add_fail_host( host => 'foo.com' ); $cb->_host_ok( host => 'foo.com' );</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>CPANPLUS::Internals::Fetch fetches files from either ftp, http, file or rsync mirrors.</p> <p>This is the rough flow:</p> <pre> $cb->_fetch Delegate to File::Fetch;</pre> <p> </p> <hr /> <h1><a name="methods">METHODS</a></h1> <p> </p> <hr /> <h1><a name="_path____fetch__module_____modobj___fetchdir______path_to_save_to___fetch_from_____scheme___path_to_fetch_from___verbose____bool__force____bool__prefer_bin____bool___">$path = _fetch( module => $modobj, [fetchdir => '/path/to/save/to', fetch_from => 'scheme://path/to/fetch/from', verbose => BOOL, force => BOOL, prefer_bin => BOOL] )</a></h1> <p><code>_fetch</code> will fetch files based on the information in a module object. You always need a module object. If you want a fake module object for a one-off fetch, look at <code>CPANPLUS::Module::Fake</code>.</p> <p><code>fetchdir</code> is the place to save the file to. Usually this information comes from your configuration, but you can override it expressly if needed.</p> <p><code>fetch_from</code> lets you specify an URI to get this file from. If you do not specify one, your list of configured hosts will be probed to download the file from.</p> <p><code>force</code> forces a new download, even if the file already exists.</p> <p><code>verbose</code> simply indicates whether or not to print extra messages.</p> <p><code>prefer_bin</code> indicates whether you prefer the use of commandline programs over perl modules. Defaults to your corresponding config setting.</p> <p><code>_fetch</code> figures out, based on the host list, what scheme to use and from there, delegates to <code>File::Fetch</code> do the actual fetching.</p> <p>Returns the path of the output file on success, false on failure.</p> <p>Note that you can set a <code>blacklist</code> on certain methods in the config. Simply add the identifying name of the method (ie, <code>lwp</code>) to: $conf->_set_fetch( blacklist => ['lwp'] );</p> <p>And the <code>LWP</code> function will be skipped by <code>File::Fetch</code>.</p> <p> </p> <h2><a name="_add_fail_host__host_____host_hashref__">_add_fail_host( host => $host_hashref )</a></h2> <p>Mark a particular host as bad. This makes <code>CPANPLUS::Internals::Fetch</code> skip it in fetches until this cache is flushed.</p> <p> </p> <h2><a name="_host_ok__host_____host_hashref__">_host_ok( host => $host_hashref )</a></h2> <p>Query the cache to see if this host is ok, or if it has been flagged as bad.</p> <p>Returns true if the host is ok, false otherwise.</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/Fetch.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