From: "Kent Fredric" <kentfredric@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: scripts/
Date: Thu, 16 Feb 2012 00:26:59 +0000 (UTC) [thread overview]
Message-ID: <1319571907.d384d09cd4451a333cd0278d1aefd5f1ffbfec25.kent@gentoo> (raw)
commit: d384d09cd4451a333cd0278d1aefd5f1ffbfec25
Author: Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Tue Oct 25 19:23:41 2011 +0000
Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Tue Oct 25 19:45:07 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=d384d09c
[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 protection.
+ 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 = grep { defined } map {
+ $_ =~ /^--(\w+)/
+ ? do { $flags->{$1}++; undef }
+ : do {
+ $_ =~ /^-(\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) <kentfredric@gmail.com>
+# 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) = shift(@ARGV);
+
+my $result = [ map { $_->{as_string} } metacpan->find_dist_simple( $release , {notrim=>1}) ];
+
+use Data::Dump qw( pp );
+use JSON qw( to_json );
+say to_json($result , { pretty => 1 } );
+1;
+
+sub pkg_for_module {
+ my ($module) = shift;
+
+}
+
+sub gen_dep {
+ state $template = qq{\t# %s%s\n\techo %s\n};
+ my ( $module, $version ) = @_;
+
+}
+
+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
+}
next reply other threads:[~2012-02-16 0:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 0:26 Kent Fredric [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-16 0:27 [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: scripts/ Kent Fredric
2012-02-16 0:27 Kent Fredric
2012-02-16 0:26 Kent Fredric
2012-02-16 0:26 Kent Fredric
2012-02-16 0:26 Kent Fredric
2012-02-16 0:26 Kent Fredric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1319571907.d384d09cd4451a333cd0278d1aefd5f1ffbfec25.kent@gentoo \
--to=kentfredric@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox