From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RxpS8-0000yD-1W for garchives@archives.gentoo.org; Thu, 16 Feb 2012 00:44:04 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5593E0BCC; Thu, 16 Feb 2012 00:35:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2961BE0AC5 for ; Thu, 16 Feb 2012 00:27:06 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D6DAB1B406A for ; Thu, 16 Feb 2012 00:27:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 98F53E540F for ; Thu, 16 Feb 2012 00:26:59 +0000 (UTC) From: "Kent Fredric" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kent Fredric" Message-ID: <1319571907.d384d09cd4451a333cd0278d1aefd5f1ffbfec25.kent@gentoo> Subject: [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: scripts/ X-VCS-Repository: proj/perl-overlay X-VCS-Files: scripts/module_log.pl X-VCS-Directories: scripts/ X-VCS-Committer: kent X-VCS-Committer-Name: Kent Fredric X-VCS-Revision: d384d09cd4451a333cd0278d1aefd5f1ffbfec25 X-VCS-Branch: eclass-moretests Date: Thu, 16 Feb 2012 00:26:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 3f6c14d6-25b1-4333-ae08-5c65a7fb80b8 X-Archives-Hash: 2982dae4bb17d518c29343caae316a28 commit: d384d09cd4451a333cd0278d1aefd5f1ffbfec25 Author: Kent Fredric gmail com> AuthorDate: Tue Oct 25 19:23:41 2011 +0000 Commit: Kent Fredric gmail com> CommitDate: Tue Oct 25 19:45:07 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/perl-overlay.= git;a=3Dcommit;h=3Dd384d09c [scripts/module_log.pl] Pull out module history code into its own util --- scripts/module_log.pl | 68 +++++++++++++++++++++++++++++++++++++++++++= ++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/scripts/module_log.pl b/scripts/module_log.pl new file mode 100755 index 0000000..cf0d498 --- /dev/null +++ b/scripts/module_log.pl @@ -0,0 +1,68 @@ +#!/usr/bin/env perl + +eval 'echo "Called with something not perl"' && exit 1 # Non-Perl pro= tection. + if 0; + +use 5.14.2; +use strict; +use warnings; +use FindBin; +use lib "$FindBin::Bin/lib"; +use env::gentoo::perl_experimental; +use metacpan qw( mcpan ); + +my $flags; +my $singleflags; + +@ARGV =3D grep { defined } map { + $_ =3D~ /^--(\w+)/ + ? do { $flags->{$1}++; undef } + : do { + $_ =3D~ /^-(\w+)/ + ? do { $singleflags->{$1}++; undef } + : do { $_ } + } +} @ARGV; + +if ( $flags->{help} or $singleflags->{h} ) { print help(); exit 0; } + +# FILENAME: module_log.pl +# CREATED: 25/10/11 12:15:51 by Kent Fredric (kentnl) +# ABSTRACT: Show the full history of a Module across distributions. + +# usage: +# +# module_log.pl Class::MOP +# # emits both Class-MOP and Moose history +my ($release) =3D shift(@ARGV); + +my $result =3D [ map { $_->{as_string} } metacpan->find_dist_simple( $re= lease , {notrim=3D>1}) ]; + +use Data::Dump qw( pp ); +use JSON qw( to_json ); +say to_json($result , { pretty =3D> 1 } ); +1; + +sub pkg_for_module { + my ($module) =3D shift; + +} + +sub gen_dep { + state $template =3D qq{\t# %s%s\n\techo %s\n}; + my ( $module, $version ) =3D @_; + +} + +sub help { + return <<'EOF'; +module_log.pl + +USAGE: + + module_log.pl Class::MOP::Class + + # See Class::MOP::Class started in Class-MOP and moved to Moose + +EOF +}