Edit D:\app\Administrator\product\11.2.0\dbhome_1\perl\html\lib\CPANPLUS\Selfupdate.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/Selfupdate.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/Selfupdate.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="#methods">METHODS</a></li> <ul> <li><a href="#_self___cpanplus__selfupdate__new___backend_object___">$self = CPANPLUS::Selfupdate->new( $backend_object );</a></li> <li><a href="#_list____self__list_modules_to_update__update____core_dependencies_enabled_features_features_all___latest____bool___">%list = $self->list_modules_to_update( update => "core|dependencies|enabled_features|features|all", [latest => BOOL] )</a></li> <li><a href="#_features____self__list_features">@features = $self->list_features</a></li> <li><a href="#_features____self__list_enabled_features">@features = $self->list_enabled_features</a></li> <li><a href="#_mods____self__modules_for_feature__feature___as_hash___">@mods = $self->modules_for_feature( FEATURE [,AS_HASH] )</a></li> <li><a href="#_mods____self__list_core_dependencies___as_hash___">@mods = $self->list_core_dependencies( [AS_HASH] )</a></li> <li><a href="#_mods____self__list_core_modules___as_hash___">@mods = $self->list_core_modules( [AS_HASH] )</a></li> </ul> <li><a href="#cpanplus__selfupdate__module">CPANPLUS::Selfupdate::Module</a></li> <ul> <li><a href="#_version____mod__version_required">$version = $mod->version_required</a></li> <li><a href="#_bool____mod__is_installed_version_sufficient">$bool = $mod->is_installed_version_sufficient</a></li> </ul> <li><a href="#bug_reports">BUG REPORTS</a></li> <li><a href="#author">AUTHOR</a></li> <li><a href="#copyright">COPYRIGHT</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <h1><a name="name">NAME</a></h1> <p>CPANPLUS::Selfupdate</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> $su = $cb->selfupdate_object; @feats = $su->list_features; @feats = $su->list_enabled_features; @mods = map { $su->modules_for_feature( $_ ) } @feats; @mods = $su->list_core_dependencies; @mods = $su->list_core_modules; for ( @mods ) { print $_->name " should be version " . $_->version_required; print "Installed version is not uptodate!" unless $_->is_installed_version_sufficient; } $ok = $su->selfupdate( update => 'all', latest => 0 );</pre> <p> </p> <hr /> <h1><a name="methods">METHODS</a></h1> <p> </p> <h2><a name="_self___cpanplus__selfupdate__new___backend_object___">$self = CPANPLUS::Selfupdate->new( $backend_object );</a></h2> <p>Sets up a new selfupdate object. Called automatically when a new backend object is created.</p> <p> </p> <h2><a name="_list____self__list_modules_to_update__update____core_dependencies_enabled_features_features_all___latest____bool___">%list = $self->list_modules_to_update( update => "core|dependencies|enabled_features|features|all", [latest => BOOL] )</a></h2> <pre> List which modules C<selfupdate> would upgrade. You can update either the core (CPANPLUS itself), the core dependencies, all features you have currently turned on, or all features available, or everything.</pre> <p>The <code>latest</code> option determines whether it should update to the latest version on CPAN, or if the minimal required version for CPANPLUS is good enough.</p> <pre> Returns a hash of feature names and lists of module objects to be upgraded based on the category you provided. For example:</pre> <pre> %list = $self->list_modules_to_update( update => 'core' ); Would return:</pre> <pre> ( core => [ $module_object_for_cpanplus ] ); =cut sub list_modules_to_update { my $self = shift; my $cb = $self->(); my $conf = $cb->configure_object; my %hash = @_; my($type, $latest); my $tmpl = { update => { required => 1, store => \$type, allow => [ keys %$cache ], }, latest => { default => 0, store => \$latest, allow => BOOLEANS }, }; { local $Params::Check::ALLOW_UNKNOWN = 1; check( $tmpl, \%hash ) or return; } my $ref = $cache->{$type};</pre> <pre> ### a list of ( feature1 => \@mods, feature2 => \@mods, etc ) my %list = UNIVERSAL::isa( $ref, 'ARRAY' ) ? map { $cache->{$_}->( $self ) } @$ref : $ref->( $self );</pre> <pre> ### filter based on whether we need the latest ones or not for my $aref ( values %list ) { $aref = [ $latest ? grep { !$_->is_uptodate } @$aref : grep { !$_->is_installed_version_sufficient } @$aref ]; } return %list; } =head2 $bool = $self->selfupdate( update => "core|dependencies|enabled_features|features|all", [latest => BOOL, force => BOOL] )</pre> <p>Selfupdate CPANPLUS. You can update either the core (CPANPLUS itself), the core dependencies, all features you have currently turned on, or all features available, or everything.</p> <p>The <code>latest</code> option determines whether it should update to the latest version on CPAN, or if the minimal required version for CPANPLUS is good enough.</p> <p>Returns true on success, false on error.</p> <p> </p> <h2><a name="_features____self__list_features">@features = $self->list_features</a></h2> <p>Returns a list of features that are supported by CPANPLUS.</p> <p> </p> <h2><a name="_features____self__list_enabled_features">@features = $self->list_enabled_features</a></h2> <p>Returns a list of features that are enabled in your current CPANPLUS installation.</p> <p> </p> <h2><a name="_mods____self__modules_for_feature__feature___as_hash___">@mods = $self->modules_for_feature( FEATURE [,AS_HASH] )</a></h2> <p>Returns a list of <code>CPANPLUS::Selfupdate::Module</code> objects which represent the modules required to support this feature.</p> <p>For a list of features, call the <code>list_features</code> method.</p> <p>If the <code>AS_HASH</code> argument is provided, no module objects are returned, but a hashref where the keys are names of the modules, and values are their minimum versions.</p> <p> </p> <h2><a name="_mods____self__list_core_dependencies___as_hash___">@mods = $self->list_core_dependencies( [AS_HASH] )</a></h2> <p>Returns a list of <code>CPANPLUS::Selfupdate::Module</code> objects which represent the modules that comprise the core dependencies of CPANPLUS.</p> <p>If the <code>AS_HASH</code> argument is provided, no module objects are returned, but a hashref where the keys are names of the modules, and values are their minimum versions.</p> <p> </p> <h2><a name="_mods____self__list_core_modules___as_hash___">@mods = $self->list_core_modules( [AS_HASH] )</a></h2> <p>Returns a list of <code>CPANPLUS::Selfupdate::Module</code> objects which represent the modules that comprise the core of CPANPLUS.</p> <p>If the <code>AS_HASH</code> argument is provided, no module objects are returned, but a hashref where the keys are names of the modules, and values are their minimum versions.</p> <p> </p> <hr /> <h1><a name="cpanplus__selfupdate__module">CPANPLUS::Selfupdate::Module</a></h1> <p><code>CPANPLUS::Selfupdate::Module</code> extends <code>CPANPLUS::Module</code> objects by providing accessors to aid in selfupdating CPANPLUS.</p> <p>These objects are returned by all methods of <code>CPANPLUS::Selfupdate</code> that return module objects.</p> <p> </p> <h2><a name="_version____mod__version_required">$version = $mod->version_required</a></h2> <p>Returns the version of this module required for CPANPLUS.</p> <p> </p> <h2><a name="_bool____mod__is_installed_version_sufficient">$bool = $mod->is_installed_version_sufficient</a></h2> <p>Returns true if the installed version of this module is sufficient for CPANPLUS, or false if it is not.</p> <p> </p> <hr /> <h1><a name="bug_reports">BUG REPORTS</a></h1> <p>Please report bugs or other issues to <<a href="mailto:bug-cpanplus@rt.cpan.org<gt>">bug-cpanplus@rt.cpan.org<gt></a>.</p> <p> </p> <hr /> <h1><a name="author">AUTHOR</a></h1> <p>This module by Jos Boumans <<a href="mailto:kane@cpan.org">kane@cpan.org</a>>.</p> <p> </p> <hr /> <h1><a name="copyright">COPYRIGHT</a></h1> <p>The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <<a href="mailto:kane@cpan.org">kane@cpan.org</a>>. All rights reserved.</p> <p>This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.</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/Selfupdate.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