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 1RxpSD-0000yb-6i for garchives@archives.gentoo.org; Thu, 16 Feb 2012 00:44:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 26F84E0BDC; Thu, 16 Feb 2012 00:36:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9198CE0AC5 for ; Thu, 16 Feb 2012 00:27:07 +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 12D4C1B406C for ; Thu, 16 Feb 2012 00:27:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C717AE5410 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: <1319571919.eeb6d383783c990d56f039cd0ffe92c9e0dc6838.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: eeb6d383783c990d56f039cd0ffe92c9e0dc6838 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: db34fee3-239b-40be-a5d5-ea1cb3b0247d X-Archives-Hash: 347e68d26a9682399f51c08ff99bf361 commit: eeb6d383783c990d56f039cd0ffe92c9e0dc6838 Author: Kent Fredric gmail com> AuthorDate: Tue Oct 25 19:43:09 2011 +0000 Commit: Kent Fredric gmail com> CommitDate: Tue Oct 25 19:45:19 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/perl-overlay.= git;a=3Dcommit;h=3Deeb6d383 [scripts/module_log.pl] improve help --- scripts/module_log.pl | 66 +++++++++++++++++++++++++++++++++++++------= ----- 1 files changed, 51 insertions(+), 15 deletions(-) diff --git a/scripts/module_log.pl b/scripts/module_log.pl index cf0d498..ff012af 100755 --- a/scripts/module_log.pl +++ b/scripts/module_log.pl @@ -26,6 +26,52 @@ my $singleflags; =20 if ( $flags->{help} or $singleflags->{h} ) { print help(); exit 0; } =20 +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 + # + # NOTE: Due to a caveat in PAUSE with how indexing works, Modules ma= y look + # like they're comming from weird places. + # + # this is usually due to somebody lexically hacking a foreign packag= e like so: + # + # { package Foo; blah blah blah } + # + # Unfortunately, PAUSE indexer sees that 'package Foo' and then deem= s this a place 'Foo' is defined. + # + # Usually that doesn't pose a problem, as the author who releases th= e containing package rarely has + # AUTHORITY permssion on the hacked package, so it doesn't get index= ed. ( ie: HTTP::Request::Common ) + # + # However, in the event the author has permissions to publish 'Foo',= the indexer runs the risk + # of taking that tiny little package declaration as *the most recent= version of that package* + # and is likely to try installing it. ( ie: HTTP::Message ) + # + # For the most part, the "indexed but not authorised" case is elimin= ated by the query, + # but we have to weed out some false matches client side due to a cu= rrent API limitation. + # + # but you can turn this weeding off for diagnostic reasons with + # + # module_log.pl --notrim HTTP::Message + # + # PROTIP: Usually when people do this foreign hacking, they don't de= fine a VERSION in the same context + # which thankfully gives you the ability to assume its not sourceabl= e. + # + # Try this: + # + # module_log.pl --notrim HTTP::Request::Common + # + # and see all the hacking in Apache-TestRequest turn up =3D) + # + +EOF +} + # 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. @@ -34,13 +80,15 @@ if ( $flags->{help} or $singleflags->{h} ) { print he= lp(); exit 0; } # # module_log.pl Class::MOP # # emits both Class-MOP and Moose history + +use Data::Dump qw( pp ); + my ($release) =3D shift(@ARGV); =20 -my $result =3D [ map { $_->{as_string} } metacpan->find_dist_simple( $re= lease , {notrim=3D>1}) ]; +my $result =3D [ map { $_->{as_string} } metacpan->find_dist_simple( $re= lease, $flags ) ]; =20 -use Data::Dump qw( pp ); use JSON qw( to_json ); -say to_json($result , { pretty =3D> 1 } ); +say to_json( $result, { pretty =3D> 1 } ); 1; =20 sub pkg_for_module { @@ -54,15 +102,3 @@ sub gen_dep { =20 } =20 -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 -}