CPANPL...update(3pm)
π CPANPLUS::Selfupdate β self-updating for CPANPLUS π
okay bestie, welcome to the self-updating era of CPANPLUS π¦ this is a page from the User Contributed Perl Documentation and it lives in section 3pm, and honestly? it's giving "let me update myself, no cap." β¨
πΈ SYNOPSIS πΈ
like, here's the vibe in code:
$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 );
look at her go π iconic behaviour, periodt.
β¨ METHODS β¨
π
$self = CPANPLUS::Selfupdate->new( $backend_object )
Sets up a brand new selfupdate object. Called automatically when a new backend object is created, so she basically shows up to the party on her own. no invite needed π
π§ @cat = $self->list_categories
Returns a list of categories that the "selfupdate" method accepts. π
See "selfupdate" for the deets, bestie.
π %list = $self->list_modules_to_update( update => "core|dependencies|enabled_features|features|all", [latest => BOOL] )
Lists which modules "selfupdate" would upgrade. you can update either the core (that's CPANPLUS herself), the core dependencies, all features you have currently turned on, or all features available, or like... everything. all of it. the whole buffet.
The "latest" option decides whether it should update to the latest version on CPAN, or if the minimal required version for CPANPLUS is good enough. (lowkey, sometimes good enough is good enough π
)
Returns a hash of feature names and lists of module objects to be upgraded, based on the category you provided. For example:
%list = $self->list_modules_to_update( update => 'core' );
Would return:
( core => [ $module_object_for_cpanplus ] );
slay.
π₯ $bool = $self->selfupdate( update => "core|dependencies|enabled_features|features|all", [latest => BOOL, force => BOOL] )
Selfupdate CPANPLUS. the main character method, fr fr. You can update either the core (CPANPLUS itself), the core dependencies, all features you have currently turned on, or all features available, or everything.
The "latest" option determines whether it should update to the latest version on CPAN, or if the minimal required version for CPANPLUS is good enough.
Returns true on success, false on error. that's it, that's the deal π«Ά
π¦ @features = $self->list_features
Returns a list of features that are supported by CPANPLUS. window shopping, basically ποΈ
π @features = $self->list_enabled_features
Returns a list of features that are enabled in your current CPANPLUS installation. the ones you actually said yes to π
β @mods = $self->modules_for_feature( FEATURE [,AS_HASH] )
Returns a list of "CPANPLUS::Selfupdate::Module" objects which represent the modules required to support this feature.
For a list of features, call the "list_features" method. (go ask her, she knows π)
If the "AS_HASH" argument is provided, no module objects are returned β instead you get a hashref where the keys are names of the modules, and the values are their minimum versions. two formats, one method, versatile queen β¨
πΈ @mods = $self->list_core_dependencies( [AS_HASH] )
Returns a list of "CPANPLUS::Selfupdate::Module" objects which represent the modules that comprise the core dependencies of CPANPLUS.
If the "AS_HASH" argument is provided, no module objects are returned, but a hashref where the keys are names of the modules, and the values are their minimum versions. same energy as above π
π @mods = $self->list_core_modules( [AS_HASH] )
Returns a list of "CPANPLUS::Selfupdate::Module" objects which represent the modules that comprise the core of CPANPLUS. the inner circle. the main squad.
If the "AS_HASH" argument is provided, no module objects are returned, but a hashref where the keys are names of the modules, and the values are their minimum versions.
π CPANPLUS::Selfupdate::Module π
"CPANPLUS::Selfupdate::Module" extends "CPANPLUS::Module" objects by providing accessors to aid in selfupdating CPANPLUS. it's the glow-up arc, literally π¦
These objects are returned by all methods of "CPANPLUS::Selfupdate" that return module objects. every single one. no cap.
π« $version = $mod->version_required
Returns the version of this module required for CPANPLUS. the minimum bar, the entry requirement, the vibe check β
π $bool = $mod->is_installed_version_sufficient
Returns true if the installed version of this module is sufficient for CPANPLUS, or false if it is not. that's the whole method. simple. effective. ate. π
π BUG REPORTS π
Please report bugs or other issues to bug-cpanplus@rt.cpan.org. (the page prints it as <bug-cpanplus@rt.cpan.org<gt>, so that's the exact string, bestie β copy it carefully π)
π AUTHOR π
This module by Jos Boumans kane@cpan.org.
π COPYRIGHT π
The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans kane@cpan.org. All rights reserved.
This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.
and that's the page!! this doc is from perl v5.40.1, dated 2025-03-01, filed under CPANPL...update(3pm). go forth and selfupdate, bestie π«Άβ¨π
π¦ where this page comes from
- debian trixie: libcpanplus-perl 0.9916-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcpanplus-perl 0.9916-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcpanplus-perl 0.9916-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms