App-ucpan

 view release on metacpan or  search on metacpan

script/ucpan  view on Meta::CPAN

    }

    sub get {
        my $self = shift;
        $self->{_length} || return;
        my $value = shift @{ $self->{_pool} };
        $self->{_length} = @{ $self->{_pool} } + 0;
        $value;
    }
}
__END__

=head1 NAME

ucpan - improved CPAN modules updater


=head1 SYNOPSIS

    ucpan      # update outdated modules,
               # but skip previously failed modules
    ucpan --local-lib /my/local/lib
               # update modules into your local lib, like cpanm
    ucpan --mirror http://example.com/CPAN/mirror
               # use CPAN mirror site, like cpanm and cpan-outdated
    ucpan -f   # update outdated modules even if failed previously
    ucpan -s   # show previously failed modules and exit
    ucpan -c   # check outdated modules and exit


=head1 DESCRIPTION

ucpan is module update program.

This program has the following advantages over executing "cpan-outdated | cpanm" from the command line.

=over 4

=over 2

=item * Display the outdated module list in easy-to-see table format.

=item * Display the progress from fetch to install compactly (in principle, in one line).

=item * Display summary of results in table format.

=back

=back

This program are executed in the following order.

=over 4

=item 1. Check Phase

Outdated modules are checked and listed.
The version number of the module that failed in
the previous execution record is compared with
the latest version number and
if not updated it is marked to skip the installation.
The list is displayed in tabular form.

  (example)
    >>> Checking Outdated Modules...
                        Name    Current     Latest    Fail at...
                   App::Cpan       1.66      1.675
                Archive::Tar    2.24_01       2.32
                    B::Debug       1.24       1.26
                      bigint       0.47       0.51
                        Carp       1.42       1.50
              Compress::Zlib      2.074      2.084    Test
                           .........
            Unicode::Collate       1.19       1.27
          Unicode::Normalize       1.25       1.26
                     version     0.9917     0.9924
                                                           7sec.

The update target and the skip module are displayed in a color-coded manner.

=item 2. Installation Phase

Outdated modules are sequentially installed for each distribution.
The progress of installation will be displayed in one line,
one by one in order of fetch, build, test, installation.
If it fails in the middle, "Failure" is displayed,
and it moves to the next module.
If a dependent module is found,
the display is indented and the same process is done.

  (example)
    >>> Upgrading outdated modules
    Archive-Tar [Archive::Tar] (1/57)
    Fetch..Configure..Build..Test..FAIL(23 sec)

    B-Debug [B::Debug] (2/57)
    Fetch..Configure..Build..Test..Install..SUCCESS(10 sec)

    CPAN [App::Cpan] (3/57)
    Fetch..Configure..Dependency found!
      Compress-Bzip2 [Compress::Bzip2]
      Fetch..Configure..Build..Test..Install..SUCCESS(47 sec)
      File-HomeDir [File::HomeDir]
      Fetch..Configure..Dependency found!
        File-Which [File::Which]
        Fetch..Configure..Build..Test..Install..SUCCESS(8 sec)
      -->[File-HomeDir]Build..Test..Install..SUCCESS(19 sec)
      Module-Build [Module::Build]
      Fetch..Configure..Build..Test..FAIL(88 sec)
    ......
      Archive-Zip [Archive::Zip]
      Fetch..Configure..Dependency found!
        Test-MockModule [Test::MockModule]
        Fetch..FAIL(0 sec)
      --> Archive-Zip...FAIL(1 sec)
    --> CPAN...FAIL(709 sec)

    Carp [Carp] (9/57)
    Fetch..Configure..

Ongoing process, SUCCESS, FAIL etc are color coded.

Installation logs and working files are placed under $HOME/.cpanm (like L<cpanm>).

=item 3. Result Phase

The results sammary of the installation will be displayed in tabular form with a list of successes and failures, and displayed the number of successful modules, added modules and failed modules.

  (example)
    **************** SUMMARY ****************
    Upgrade Success----------------------------------------------
        Compress::Raw::Bzip2   2.074      2.084
                   Net::HTTP   ~          6.18
              HTML::Entities   ~          3.69
                HTTP::Daemon   ~          6.01
             Config::Perl::V   0.280      0.310
                           ......
          Filter::Util::Call   1.550      1.590
                  Test::YAML   ~          1.07
    Fail to upgrade----------------------------------------------
                   App::Cpan   1.660      1.675      Dependency
                     IO::Pty              1.12       Configure
                Archive::Tar   2.240100   2.320      Test
           ExtUtils::Command   7.240      7.340      Test
            Test::MockModule              v0.170.0   Fetch
                     DB_File   1.840      1.843      Build
      Math::BigInt::FastCalc   0.500500   0.500800   Dependency
    47 modules upgraded.
    32 modules added.
    20 modules FAILURE.

=back


=head1 COMMANDS

The commands can control the execution of this program.

Only one command can be specified to determine the execution mode.
If the command is not specified,
it is executed in the check and installation mode.

=over 4

=item -c, --check-only

Check updated modules and exit.

=item -s, --show-fails

Display previously failed modules list in table format and exit.
Note that this list is generated from previous execution record,
therefore, the latest version number of modules installed without this program after the last execution is not reflected.

=item -r, --recover

Recover recoding file againt unwanted result.
In this mode, failed modules are removed from the previous execution record except usual failure( this failure is marked as "UNKNOWN" ).

=item -v, --version

Display the version number.

=item -h, --help

Display the help message.

=back


=head1 OPTIONS

=over 4

=item -f, --force-try

Also install modules marked as skipped.

=item -l, --local-lib

=item -L, --local-lib-conained

Works same as L<cpanm>, and also same as L<cpan-outdated>.

See L<cpanm> for more detail.

=item --exclude-core

Never list the core modules in the outdated module list.

=item --mirror

Works same as L<cpanm>, and also same as L<cpan-outdated>,
but L<cpanm> and L<cpan-outdated> have differences in the behavior of this option.

Note: This option follows the behavior of cpan-outdated:

=over 2

=item * L<cpanm> can take more than one mirror, but L<cpan-outdated> only enables last one.

=item * L<cpan-outdated> only looks at the modules list of the mirror looking for outdated modules. It does not reference metacpan's database like L<cpanm>.

=back

=item --configure-timeout



( run in 0.584 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )