App-cpanoutdated-coro
view release on metacpan or search on metacpan
script/cpan-outdated-coro view on Meta::CPAN
my $exe_ext = $Config{_exe};
foreach my $dir ( File::Spec->path ) {
my $fullpath = File::Spec->catfile( $dir, $name );
if ( -x $fullpath || -x ( $fullpath .= $exe_ext ) ) {
if ( $fullpath =~ /\s/ && $fullpath !~ /^$quote/ ) {
$fullpath = "$quote$fullpath$quote";
}
return $fullpath;
}
}
return;
}
sub getstore {
my ( $url, $fname ) = @_;
my $ua = LWP::UserAgent->new( parse_head => 0, );
$ua->env_proxy();
my $request = HTTP::Request->new( GET => $url );
my $response = $ua->request( $request, $fname );
if ( my $died = $response->header('X-Died') ) {
die "Cannot getstore $url to $fname: $died";
}
elsif ( $response->code == 200 ) {
return 1;
}
else {
die "Cannot getstore $url to $fname: " . $response->status_line;
}
}
sub zopen {
IO::Zlib->new( $_[0], "rb" );
}
sub make_inc {
my ( $base, $self_contained ) = @_;
if ($base) {
require local::lib;
my @modified_inc = (
local::lib->install_base_perl_path($base),
local::lib->install_base_arch_path($base),
);
if ($self_contained) {
push @modified_inc, @Config{qw(privlibexp archlibexp)};
}
else {
push @modified_inc, @INC;
}
return @modified_inc;
}
else {
return @INC;
}
}
__END__
=head1 NAME
cpan-outdated-coro - faster C<cpan-outdated>
=head1 SYNOPSIS
# usage is the same:=)
# print the list of distribution that contains outdated modules
% cpan-outdated-coro
# print the list of outdated modules in packages
% cpan-outdated-coro -p
# verbose
% cpan-outdated-coro --verbose
# alternate mirrors
% cpan-outdated-coro --mirror file:///home/user/minicpan/
# additional module path(same as cpanminus)
% cpan-outdated-coro -l extlib/
% cpan-outdated-coro -L extlib/
# install with cpan
% cpan-outdated-coro | xargs cpan -i
# install with cpanm
% cpan-outdated-coro | cpanm
% cpan-outdated-coro -p | cpanm
=head1 DESCRIPTION
( version 0.04 and later not use Coro, but never change the name of this distribution. )
This script works the same as C<cpan-outdated>(prints the list of outdated CPAN modules in your machine), but fast.
This script also can be integrated with L<cpanm> command.
=head1 USAGE
Using this script, only type with C<cpan-outdated-coro>
instead of C<cpan-outdated>.
Functions and options are completely the same as C<cpan-outdated>.
See C<cpan-outdated> for more details.
=head1 PERFORMANCE AND TRADE-OFF
This script is faster than C<cpan-outdated> 423%.
Use less memory - about 23%(39.01MB -> 30.06MB on MS-Win32.
C/W: 'cpan -O' uses 213MB)
trade-off:
=over 4
=item *
Use non-core modules - see C<DEPENDENCIES>.
=back
=head1 DEPENDENCIES
File::Find::Rule
AnyEvent
=head1 AUTHOR
KPEE
=head1 SPECIAL THANKS
Tokuhiro Matsuno(author of C<cpan-outdated>)
=head1 LICENSE
Copyright (C) 2014 KPEE
Original C<cpan-outdated> Copyright (C) 2009 Tokuhiro Matsuno.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
=head1 SEE ALSO
L<App::cpanoutdated>
=cut
__END__
( run in 1.297 second using v1.01-cache-2.11-cpan-39bf76dae61 )