Build.PL100664002000002000 45513064443355 15773 0ustar00omengueomengue000000000000cpan-outdated-0.32# ========================================================================= # THIS FILE IS AUTOMATICALLY GENERATED BY MINILLA. # DO NOT EDIT DIRECTLY. # ========================================================================= use 5.008_001; use strict; use Module::Build::Tiny 0.035; Build_PL(); Changes100664002000002000 734613064443355 16020 0ustar00omengueomengue000000000000cpan-outdated-0.320.32 2017-03-22T09:42:04Z - Tests: add compatibility with dot-less-@INC perls (5.25.11+) #36, #37 (syohex) 0.31 2016-05-26T20:38:01Z - Check also core modules (unless explicitely excluded) to report dual-life (core+CPAN) modules #32 0.30 2016-05-03T23:29:25Z - Use HTTP::Tiny instead of LWP::UserAgent (grinnz, dolmen) - Lazy load the modules the script optionally uses (dolmen) - Meta: declare dependencies including from perl core 0.29 2015-07-28T14:18:42Z - Limit the modules to check #28 (miyagawa) - MAJOR SPEEDUP: skip already reported dists early #27 (dolmen) - Use local index copy #25 (dolmen) 0.28 2013-03-28T10:26:27Z - Fixed deps (reported by aer0++) 0.27 2013-03-28T09:08:51Z - packaging, again 0.26 2013-03-28T02:43:34Z - re-packaging 0.25 2013-03-28T02:13:05Z commit 6843e0eb2fed8e0cbffabae0b3b87b49d75fd177 Author: Oleg Gashev Date: Wed Mar 27 16:21:05 2013 -0400 Fix lintian warning: manpage-has-bad-whatis-entry usr/share/man/man3/App::cpanoutdated.3pm.gz. http://lintian.debian.org/tags/manpage-has-bad-whatis-entry.html. 0.24 commit 542e8c296fc59c28d8e98aae7a65b3cf67cb12d1 Author: Sharl Morlaroll Date: Tue Oct 23 01:19:00 2012 +0900 fix --exclude-core 0.23 - setup abstract https://rt.cpan.org/Public/Bug/Display.html?id=77958 0.22 - better error diag, reported by ssb++ 0.21 - Fixed: Failure if module CPAN version is 'bogus' https://rt.cpan.org/Public/Bug/Display.html?id=73465 (Reported by dolmen) 0.20 - use Module::Metadata for better handling of version and package extra (Tatsuhiko Miyagawa) 0.19 - better packaging 0.18 - hmmm. i released broken dist at last night with too much alchole... me--. 0.17 - fixed cpan doc fix(Olaf Alders) 0.16 - skip perl distribution not only for perl-X.Y.Z.tar.gz but also perl-X.Y.Z.tar.bz2(kmx) 0.15 - --compare-changes deprecated. It can use cpan-listchanges instead.(nihen) 0.14 - doc enhancements(gfx) 0.13 - Support -p|--print-package option for cpanm version tracking (miyagawa) 0.12 - Do not install old distribution. (reported by leedo) https://github.com/tokuhirom/cpan-outdated/issues/issue/4/ - Do not modify @INC on -l and -L. It breaks lazy loading in LWP. 0.11 - removed -I option(sorry, It's my misstake.) - added -l and -L option for local::lib support. Option meaning is same as cpanm. suggested by Sebastian Willert [RT#59454] 0.10 - added -I option, suggested by Sebastian Willert [RT#59454] 0.09 - added --compare-changes option(by nihen++) 0.08 - fixed Win32::GUI::Constants::Tags issue. 02packages.details.txt.gz says version number is 'undef'. but EU::MM says '0.04'. (reported by aer0++, fixed by chiba++) It's distribution issue. But I added workaround. 0.07 - depend to EU::MM 6.56 for better version number parsing. (thanks to chiba++) 0.06 - version number comparator should be more permissive RT#58165(reported by Rafael Kitover) 0.05 - allow specifying alternate mirror urls(doy++) 0.04 - oops. 0.03 is wrong release. ( no feature changes) 0.03 - added workaround for MM->parse_version() issue around Authen::Simple::Apache. (The issue was reported to EU::MM authors) (reported by rafl++) - switch to version.pm instead of copied CPAN::Version. Yes, it's not 5.8 core module. But, if you want to use this command, you can install version.pm :P (suggested by hanekomu++) 0.02 - shut up warnings on v-string (reported by aer0++) 0.01 - initial release LICENSE100664002000002000 4367213064443355 15554 0ustar00omengueomengue000000000000cpan-outdated-0.32This software is copyright (c) 2011 by Tokuhiro Matsuno. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2011 by unknown. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2011 by unknown. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End META.json100664002000002000 557113064443355 16144 0ustar00omengueomengue000000000000cpan-outdated-0.32{ "abstract" : "detect outdated CPAN modules in your environment.", "author" : [ "Tokuhiro Matsuno" ], "dynamic_config" : 0, "generated_by" : "Minilla/v3.0.10", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "cpan-outdated", "no_index" : { "directory" : [ "t", "xt", "inc", "share", "eg", "examples", "author", "builder" ] }, "prereqs" : { "configure" : { "requires" : { "Module::Build::Tiny" : "0.035" } }, "develop" : { "requires" : { "Test::CPAN::Meta" : "0", "Test::MinimumVersion::Fast" : "0.04", "Test::PAUSE::Permissions" : "0.04", "Test::Pod" : "1.41", "Test::Spellunker" : "v0.2.7" } }, "runtime" : { "requires" : { "CPAN::DistnameInfo" : "0.1", "ExtUtils::Installed" : "0", "File::Temp" : "0", "Getopt::Long" : "0", "HTTP::Tiny" : "0.012", "IO::Zlib" : "0", "Module::CoreList" : "0", "Module::Metadata" : "1.000007", "Pod::Usage" : "0", "URI" : "0", "local::lib" : "1.006008", "perl" : "5.008001", "version" : "0" } } }, "provides" : { "App::cpanoutdated" : { "file" : "lib/App/cpanoutdated.pm", "version" : "0.32" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/tokuhirom/cpan-outdated/issues" }, "homepage" : "https://github.com/tokuhirom/cpan-outdated", "repository" : { "url" : "git://github.com/tokuhirom/cpan-outdated.git", "web" : "https://github.com/tokuhirom/cpan-outdated" } }, "version" : "0.32", "x_authority" : "cpan:TOKUHIROM", "x_contributors" : [ "Jesse Luehrs ", "Fuji, Goro ", "Masahiro Chiba ", "kmx ", "Olaf Alders ", "Paul Findlay ", "Sharl Morlaroll ", "Oleg Gashev ", "David Steinbrunner ", "opendevnet ", "Tatsuhiko Miyagawa ", "Joenio Costa ", "Dan Book ", "Tokuhiro Matsuno ", "Ben Bullock ", "Tatsuhiko Miyagawa ", "Syohei YOSHIDA ", "Olivier Mengué " ], "x_serialization_backend" : "JSON::PP version 2.27400" } README.md100664002000002000 100713064443355 15770 0ustar00omengueomengue000000000000cpan-outdated-0.32# NAME App::cpanoutdated - detect outdated CPAN modules in your environment. # DESCRIPTION see [cpan-outdated](https://metacpan.org/pod/cpan-outdated). # AUTHOR Tokuhiro Matsuno # LICENSE 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. # SEE ALSO [CPAN](https://metacpan.org/pod/CPAN) [App::cpanminus](https://metacpan.org/pod/App::cpanminus) [App::DualLivedList](https://metacpan.org/pod/App::DualLivedList) cpanfile100664002000002000 55613064443355 16205 0ustar00omengueomengue000000000000cpan-outdated-0.32requires 'perl', '5.008001'; requires 'CPAN::DistnameInfo', '0.1'; requires 'ExtUtils::Installed'; requires 'File::Temp'; requires 'Getopt::Long'; requires 'HTTP::Tiny', '0.012'; requires 'IO::Zlib'; requires 'Module::CoreList'; requires 'Module::Metadata', '1.000007'; requires 'Pod::Usage'; requires 'URI'; requires 'local::lib', '1.006008'; requires 'version'; cpanoutdated.pm100664002000002000 74513064443355 21000 0ustar00omengueomengue000000000000cpan-outdated-0.32/lib/Apppackage App::cpanoutdated; use strict; use warnings; our $VERSION = "0.32"; 1; __END__ =head1 NAME App::cpanoutdated - detect outdated CPAN modules in your environment. =head1 DESCRIPTION see L. =head1 AUTHOR Tokuhiro Matsuno =head1 LICENSE 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 L L =cut minil.toml100664002000002000 3513064443355 16456 0ustar00omengueomengue000000000000cpan-outdated-0.32authority = "cpan:TOKUHIROM" cpan-outdated100775002000002000 2156313064443355 20524 0ustar00omengueomengue000000000000cpan-outdated-0.32/script#!/usr/bin/perl use strict; use warnings; use ExtUtils::Installed; use Getopt::Long; use Config; use version; use IO::Zlib; use CPAN::DistnameInfo; use Module::Metadata; use URI; our $VERSION = "0.32"; my $mirror = 'http://www.cpan.org/'; my $local_lib; my $self_contained = 0; my $index_file; my $help; Getopt::Long::Configure("bundling"); Getopt::Long::GetOptions( 'h|help' => \$help, 'verbose' => \my $verbose, 'm|mirror=s' => \$mirror, 'index=s' => \$index_file, 'p|print-package' => \my $print_package, 'I=s' => sub { die "this option was deprecated" }, 'l|local-lib=s' => \$local_lib, 'L|local-lib-contained=s' => sub { $local_lib = $_[1]; $self_contained = 1; }, 'compare-changes' => sub { die "--compare-changes option was deprecated.\n" . "You can use 'cpan-listchanges `cpan-outdated -p`' instead.\n" . "cpanm cpan-listchanges # install from CPAN\n" }, 'exclude-core' => \my $exclude_core, ) or $help++; if ($help) { require Pod::Usage; Pod::Usage::pod2usage(); } $mirror =~ s:/$::; my $index_url = "${mirror}/modules/02packages.details.txt.gz"; $index_url = URI->new($index_url); if ($index_url->isa('URI::file')) { die '--index is incompatible with a file:// mirror' if defined $index_file; $index_file = $index_url->file } my $core_modules; if ($exclude_core) { require Module::CoreList; no warnings 'once'; $core_modules = $Module::CoreList::version{$]}; } unless ($ENV{HARNESS_ACTIVE}) { &main; exit; } sub modules_to_check { my @inc = @_; my @modules = ExtUtils::Installed->new(skip_cwd => 1, inc_override => \@inc)->modules; # As core modules may not have been listed by EUI because they lack # .packlist, we add them from Module::CoreList if (!$exclude_core || ($local_lib && !$self_contained)) { require Module::CoreList; # This adds duplicates, but they are removed by the caller push @modules, keys %{ $Module::CoreList::version{$]} }; } (@modules) } sub installed_version_for { my($pkg, $inc) = @_; local $SIG{__WARN__} = sub {}; my $meta = Module::Metadata->new_from_module($pkg, inc => $inc); $meta ? $meta->version($pkg) : undef; } sub main { my @inc = make_inc($local_lib, $self_contained); if ( !defined($index_file) || ! -e $index_file || -z $index_file || !$index_url->isa('URI::file')) { $index_file = get_index($index_url, $index_file) } my %installed = map { $_ => 1 } modules_to_check(@inc); my $fh = zopen($index_file) or die "cannot open $index_file"; # skip header part while (my $line = <$fh>) { last if $line eq "\n"; } # body part my %seen; my %dist_latest_version; LINES: while (my $line = <$fh>) { my ($pkg, $version, $dist) = split /\s+/, $line; next unless $installed{$pkg}; next if $version eq 'undef'; # The note below about the latest version heuristics applies here too next if $seen{$dist}; # $Mail::SpamAssassin::Conf::VERSION is 'bogus' # https://rt.cpan.org/Public/Bug/Display.html?id=73465 next unless $version =~ /[0-9]/; # if excluding core modules next if $exclude_core && exists $core_modules->{$pkg}; next if $dist =~ m{/perl-[0-9._]+\.tar\.(gz|bz2)$}; my $inst_version = installed_version_for($pkg, \@inc) or next; if (compare_version($inst_version, $version)) { $seen{$dist}++; if ($verbose) { printf "%-30s %-7s %-7s %s\n", $pkg, $inst_version, $version, $dist; } elsif ($print_package) { print "$pkg\n"; } else { print "$dist\n"; } } } } # return true if $inst_version is less than $version sub compare_version { my ($inst_version, $version) = @_; return 0 if $inst_version eq $version; my $inst_version_obj = eval { version->new($inst_version) } || version->new(permissive_filter($inst_version)); my $version_obj = eval { version->new($version) } || version->new(permissive_filter($version)); return $inst_version_obj < $version_obj ? 1 : 0; } # for broken packages. sub permissive_filter { local $_ = $_[0]; s/^[Vv](\d)/$1/; # Bioinf V2.0 s/^(\d+)_(\d+)$/$1.$2/; # VMS-IndexedFile 0_02 s/-[a-zA-Z]+$//; # Math-Polygon-Tree 0.035-withoutworldwriteables s/([a-j])/ord($1)-ord('a')/gie; # DBD-Solid 0.20a s/[_h-z-]/./gi; # makepp 1.50.2vs.070506 s/\.{2,}/./g; $_; } # Return the $fname (a generated File::Temp object if not provided) sub get_index { my ($url, $fname) = @_; require HTTP::Tiny; my $ua = HTTP::Tiny->new; my $response; if (defined $fname) { # If the file is not empty, use it as a local cached copy if (-s $fname) { $response = $ua->mirror($url, $fname); } else { # If the file is empty we do not trust its timestamp # so set a custom If-Modified-Since (Perl 5.0 release) $response = $ua->mirror($url, $fname, { headers => { 'if-modified-since' => 'Wed, 19 Oct 1994 17:18:57 GMT', }, }); } } else { require File::Temp; $fname = File::Temp->new(UNLINK => 1, SUFFIX => '.gz'); binmode $fname; $response = $ua->request( 'GET' => $url, { data_callback => sub { print {$fname} $_[0] }, } ); close $fname; } if ($response->{status} == 599) { die "Cannot get_index $url to $fname: $response->{content}"; # 304 = "Not Modified" is still a success since we are mirroring } elsif (! $response->{success}) { die "Cannot get_index $url to $fname: $response->{status} $response->{reason}"; } #print "$fname $response->{status} $response->{reason}\n"; # Return the filename (which might be a File::Temp object) $fname } sub zopen { # Explicitely stringify the filename as it may be a File::Temp object 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 - detect outdated CPAN modules in your environment =head1 SYNOPSIS # print a list of distributions that contain outdated modules % cpan-outdated # print a list of outdated modules in packages % cpan-outdated -p # verbose % cpan-outdated --verbose  # ignore core modules (do not update dual life modules) % cpan-outdated --exclude-core # alternate mirrors % cpan-outdated --mirror file:///home/user/minicpan/ # additional module path(same as cpanminus) % cpan-outdated -l extlib/ % cpan-outdated -L extlib/ # install with cpan % cpan-outdated | xargs cpan -i # install with cpanm % cpan-outdated | cpanm % cpan-outdated -p | cpanm =head1 DESCRIPTION This script prints a list of outdated CPAN modules on your machine. This is the same feature as 'CPAN::Shell->r', but C is much faster and uses less memory. This script can be integrated with the L command. =head1 PRINTING PACKAGES VS DISTRIBUTIONS This script by default prints the outdated distribution as in the CPAN distro format, i.e: C so you can pipe it into CPAN installers, but with the C<-p> option it can be tweaked to print the module's package names. If you wish to manage a set of modules separately from your system perl installation and not install newer versions of "dual life modules" that are distributed with perl, the C<--exclude-core> option will make cpan-outdated ignore changes to core modules. Used with tools like cpanm and its C<-L --local-lib-contained> and C<--self-contained> options, this facilitates maintaining updates on standalone sets of modules. For some tools, such as L, installing from packages could be a bit more useful since you can track to see the old version number which you upgrade from. =head1 AUTHOR Tokuhiro Matsuno =head1 LICENSE 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 L If you want to see what's changed for modules that require upgrades, use L =cut 00_compile.t100664002000002000 12113064443355 17044 0ustar00omengueomengue000000000000cpan-outdated-0.32/tuse strict; use warnings; use Test::More tests => 1; use_ok 'App::cpanoutdated'; 01_compare_version.t100664002000002000 60313064443355 20615 0ustar00omengueomengue000000000000cpan-outdated-0.32/tuse strict; use warnings; use Test::More tests => 7; $ENV{HARNESS_ACTIVE} ||= 1; do './script/cpan-outdated' or die; is compare_version('1.0', '1.0'), 0; is compare_version('1.0', '0.9'), 0; is compare_version('0.8', '0.9'), 1; is compare_version('1.0a', '2.0a'), 1; is compare_version('1.0a', '1.0a'), 0; is compare_version('1.0a', '1.0b'), 1; is compare_version('1.0c', '1.0b'), 0; 02_permissive_filter.t100664002000002000 61613064443355 21162 0ustar00omengueomengue000000000000cpan-outdated-0.32/tuse strict; use warnings; use Test::More tests => 6; $ENV{HARNESS_ACTIVE} ||= 1; do './script/cpan-outdated' or die; is permissive_filter('V2.0'), '2.0'; is permissive_filter('0_02'), '0.02'; is permissive_filter('0.035-withoutworldwriteables'), '0.035'; is permissive_filter('0.20b'), '0.201'; is permissive_filter('1.50.2vs.070506'), '1.50.2.070506'; is permissive_filter('1..50.2'), '1.50.2'; 02_perlcritic.t100664002000002000 70113064443355 17752 0ustar00omengueomengue000000000000cpan-outdated-0.32/xtuse strict; use Test::More; eval q{ use Test::Perl::Critic 1.02 -exclude => [ 'Subroutines::ProhibitSubroutinePrototypes', 'Subroutines::ProhibitExplicitReturnUndef', 'TestingAndDebugging::ProhibitNoStrict', 'ControlStructures::ProhibitMutatingListFunctions', 'InputOutput::RequireEncodingWithUTF8Layer', ] }; plan skip_all => "Test::Perl::Critic 1.02+ is not installed." if $@; all_critic_ok('lib'); 06_version.t100664002000002000 50613064443355 17306 0ustar00omengueomengue000000000000cpan-outdated-0.32/xtuse strict; use warnings; use utf8; use Test::More; use App::cpanoutdated; my $ver = sub { open my $fh, '<', 'script/cpan-outdated' or die $!; while (<$fh>) { if (/VERSION\s=\s(["'])([^"']+)\1/) { return $2; } } undef; }->(); is($ver, $App::cpanoutdated::VERSION); done_testing; META.yml100664002000002000 356413064443355 15774 0ustar00omengueomengue000000000000cpan-outdated-0.32--- abstract: 'detect outdated CPAN modules in your environment.' author: - 'Tokuhiro Matsuno' build_requires: {} configure_requires: Module::Build::Tiny: '0.035' dynamic_config: 0 generated_by: 'Minilla/v3.0.10, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: cpan-outdated no_index: directory: - t - xt - inc - share - eg - examples - author - builder provides: App::cpanoutdated: file: lib/App/cpanoutdated.pm version: '0.32' requires: CPAN::DistnameInfo: '0.1' ExtUtils::Installed: '0' File::Temp: '0' Getopt::Long: '0' HTTP::Tiny: '0.012' IO::Zlib: '0' Module::CoreList: '0' Module::Metadata: '1.000007' Pod::Usage: '0' URI: '0' local::lib: '1.006008' perl: '5.008001' version: '0' resources: bugtracker: https://github.com/tokuhirom/cpan-outdated/issues homepage: https://github.com/tokuhirom/cpan-outdated repository: git://github.com/tokuhirom/cpan-outdated.git version: '0.32' x_authority: cpan:TOKUHIROM x_contributors: - 'Jesse Luehrs ' - 'Fuji, Goro ' - 'Masahiro Chiba ' - 'kmx ' - 'Olaf Alders ' - 'Paul Findlay ' - 'Sharl Morlaroll ' - 'Oleg Gashev ' - 'David Steinbrunner ' - 'opendevnet ' - 'Tatsuhiko Miyagawa ' - 'Joenio Costa ' - 'Dan Book ' - 'Tokuhiro Matsuno ' - 'Ben Bullock ' - 'Tatsuhiko Miyagawa ' - 'Syohei YOSHIDA ' - 'Olivier Mengué ' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' MANIFEST100664002000002000 34113064443355 15622 0ustar00omengueomengue000000000000cpan-outdated-0.32Build.PL Changes LICENSE META.json README.md cpanfile lib/App/cpanoutdated.pm minil.toml script/cpan-outdated t/00_compile.t t/01_compare_version.t t/02_permissive_filter.t xt/02_perlcritic.t xt/06_version.t META.yml MANIFEST