1CPANPLUS::Selfupdate(3pmP)erl Programmers Reference GuidCePANPLUS::Selfupdate(3pm)
2
3
4

NAME

6       CPANPLUS::Selfupdate
7

SYNOPSIS

9           $su     = $cb->selfupdate_object;
10
11           @feats  = $su->list_features;
12           @feats  = $su->list_enabled_features;
13
14           @mods   = map { $su->modules_for_feature( $_ ) } @feats;
15           @mods   = $su->list_core_dependencies;
16           @mods   = $su->list_core_modules;
17
18           for ( @mods ) {
19               print $_->name " should be version " . $_->version_required;
20               print "Installed version is not uptodate!"
21                   unless $_->is_installed_version_sufficient;
22           }
23
24           $ok     = $su->selfupdate( update => 'all', latest => 0 );
25

METHODS

27   $self = CPANPLUS::Selfupdate->new( $backend_object );
28       Sets up a new selfupdate object. Called automatically when a new
29       backend object is created.
30
31   @cat = $self->list_categories
32       Returns a list of categories that the "selfupdate" method accepts.
33
34       See "selfupdate" for details.
35
36   %list = $self->list_modules_to_update( update =>
37       "core|dependencies|enabled_features|features|all", [latest => BOOL] )
38       List which modules "selfupdate" would upgrade. You can update either
39       the core (CPANPLUS itself), the core dependencies, all features you
40       have currently turned on, or all features available, or everything.
41
42       The "latest" option determines whether it should update to the latest
43       version on CPAN, or if the minimal required version for CPANPLUS is
44       good enough.
45
46       Returns a hash of feature names and lists of module objects to be
47       upgraded based on the category you provided. For example:
48
49           %list = $self->list_modules_to_update( update => 'core' );
50
51       Would return:
52
53           ( core => [ $module_object_for_cpanplus ] );
54
55   $bool = $self->selfupdate( update =>
56       "core|dependencies|enabled_features|features|all", [latest => BOOL,
57       force => BOOL] )
58       Selfupdate CPANPLUS. You can update either the core (CPANPLUS itself),
59       the core dependencies, all features you have currently turned on, or
60       all features available, or everything.
61
62       The "latest" option determines whether it should update to the latest
63       version on CPAN, or if the minimal required version for CPANPLUS is
64       good enough.
65
66       Returns true on success, false on error.
67
68   @features = $self->list_features
69       Returns a list of features that are supported by CPANPLUS.
70
71   @features = $self->list_enabled_features
72       Returns a list of features that are enabled in your current CPANPLUS
73       installation.
74
75   @mods = $self->modules_for_feature( FEATURE [,AS_HASH] )
76       Returns a list of "CPANPLUS::Selfupdate::Module" objects which
77       represent the modules required to support this feature.
78
79       For a list of features, call the "list_features" method.
80
81       If the "AS_HASH" argument is provided, no module objects are returned,
82       but a hashref where the keys are names of the modules, and values are
83       their minimum versions.
84
85   @mods = $self->list_core_dependencies( [AS_HASH] )
86       Returns a list of "CPANPLUS::Selfupdate::Module" objects which
87       represent the modules that comprise the core dependencies of CPANPLUS.
88
89       If the "AS_HASH" argument is provided, no module objects are returned,
90       but a hashref where the keys are names of the modules, and values are
91       their minimum versions.
92
93   @mods = $self->list_core_modules( [AS_HASH] )
94       Returns a list of "CPANPLUS::Selfupdate::Module" objects which
95       represent the modules that comprise the core of CPANPLUS.
96
97       If the "AS_HASH" argument is provided, no module objects are returned,
98       but a hashref where the keys are names of the modules, and values are
99       their minimum versions.
100

CPANPLUS::Selfupdate::Module

102       "CPANPLUS::Selfupdate::Module" extends "CPANPLUS::Module" objects by
103       providing accessors to aid in selfupdating CPANPLUS.
104
105       These objects are returned by all methods of "CPANPLUS::Selfupdate"
106       that return module objects.
107
108   $version = $mod->version_required
109       Returns the version of this module required for CPANPLUS.
110
111   $bool = $mod->is_installed_version_sufficient
112       Returns true if the installed version of this module is sufficient for
113       CPANPLUS, or false if it is not.
114

BUG REPORTS

116       Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>.
117

AUTHOR

119       This module by Jos Boumans <kane@cpan.org>.
120
122       The CPAN++ interface (of which this module is a part of) is copyright
123       (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved.
124
125       This library is free software; you may redistribute and/or modify it
126       under the same terms as Perl itself.
127
128
129
130perl v5.12.4                      2011-06-07         CPANPLUS::Selfupdate(3pm)
Impressum