| 1 | package CPAN::Local::App::Command::update; | ||
| 2 | { | ||
| 3 | 1 | $CPAN::Local::App::Command::update::VERSION = '0.010'; | |
| 4 | } | ||
| 5 | |||
| 6 | # ABSTRACT: Update repository | ||
| 7 | |||
| 8 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | extends 'MooseX::App::Cmd::Command'; | |
| 10 | |||
| 11 | sub execute | ||
| 12 | 0 | ▶ | { |
|
Subroutine
execute: not called CC=6 SCAR=37.4
Pod
documented
| |||
| 13 | 0 | my ( $self, $opt, $args ) = @_; | |
| 14 | |||
| 15 | 0 | my $cpan_local = $self->app->cpan_local; | |
| 16 | |||
| 17 | 0 | my @distros; | |
| 18 | |||
| 19 | ### COLLECT DISTRIBUTIONS TO INJECT ### | ||
| 20 | 0 | foreach my $plugin ( $cpan_local->plugins_with('-Gather') ) | |
| 21 | { | ||
| 22 | 0 | push @distros, $plugin->gather(@distros); | |
| 23 | } | ||
| 24 | |||
| 25 | ### REMOVE DUPLICATES, ETC. ### | ||
| 26 | 0 | foreach my $plugin ( $cpan_local->plugins_with('-Prune') ) | |
| 27 | { | ||
| 28 | 0 | @distros = $plugin->prune(@distros); | |
| 29 | } | ||
| 30 | |||
| 31 | ### INJECT ### | ||
| 32 | 0 | foreach my $plugin ( $cpan_local->plugins_with('-Inject') ) | |
| 33 | { | ||
| 34 | 0 | @distros = $plugin->inject(@distros); | |
| 35 | } | ||
| 36 | |||
| 37 | ### WRITE RELEVANT INDECES ### | ||
| 38 | 0 | foreach my $plugin ( $cpan_local->plugins_with('-Index') ) | |
| 39 | { | ||
| 40 | 0 | $plugin->index(@distros); | |
| 41 | } | ||
| 42 | |||
| 43 | ### EXECUTE POST-UPDATE ACTIONS ### | ||
| 44 | 0 | foreach my $plugin ( $cpan_local->plugins_with('-Finalise') ) | |
| 45 | { | ||
| 46 | 0 | $plugin->finalise(@distros); | |
| 47 | } | ||
| 48 | } | ||
| 49 | |||
| 50 | 1 | __PACKAGE__->meta->make_immutable; | |
| 51 | |||
| 52 | |||
| 53 | __END__ | ||