r36000 - in /trunk/libmodule-extract-use-perl: Changes MANIFEST META.yml Makefile.PL debian/README.source debian/changelog debian/control debian/copyright debian/patches/ debian/rules examples/extract_modules examples/placeholder.pl lib/Use.pm
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Wed May 20 22:45:33 UTC 2009
Author: jawnsy-guest
Date: Wed May 20 22:45:27 2009
New Revision: 36000
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=36000
Log:
* New upstream release
-> Fix to detect 'use' AND compile-time 'require'
-> Added an example file
* Removed libtest-output-perl from Depends (it's only a B-D-I)
* Added libtest-manifest-perl to B-D-I
* Removed quilt patch since the whole MAN3PODS line was removed
Added:
trunk/libmodule-extract-use-perl/examples/extract_modules
Removed:
trunk/libmodule-extract-use-perl/debian/README.source
trunk/libmodule-extract-use-perl/debian/patches/
trunk/libmodule-extract-use-perl/examples/placeholder.pl
Modified:
trunk/libmodule-extract-use-perl/Changes
trunk/libmodule-extract-use-perl/MANIFEST
trunk/libmodule-extract-use-perl/META.yml
trunk/libmodule-extract-use-perl/Makefile.PL
trunk/libmodule-extract-use-perl/debian/changelog
trunk/libmodule-extract-use-perl/debian/control
trunk/libmodule-extract-use-perl/debian/copyright
trunk/libmodule-extract-use-perl/debian/rules
trunk/libmodule-extract-use-perl/lib/Use.pm
Modified: trunk/libmodule-extract-use-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/Changes?rev=36000&op=diff
==============================================================================
--- trunk/libmodule-extract-use-perl/Changes (original)
+++ trunk/libmodule-extract-use-perl/Changes Wed May 20 22:45:27 2009
@@ -1,4 +1,8 @@
# Changes for Module::Extract::Use
+
+0.14 - Wed May 20 07:07:56 2009
+ * Adjust PPI bits to look for 'require' bits too
+ * Add extract_modules example from Jonathan Yu
0.13 - Wed Oct 29 14:15:51 2008
* Only return unique elements, so remove the duplicates
Modified: trunk/libmodule-extract-use-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/MANIFEST?rev=36000&op=diff
==============================================================================
--- trunk/libmodule-extract-use-perl/MANIFEST (original)
+++ trunk/libmodule-extract-use-perl/MANIFEST Wed May 20 22:45:27 2009
@@ -1,6 +1,6 @@
Changes
corpus/Repeated.pm
-examples/placeholder.pl
+examples/extract_modules
lib/Use.pm
LICENSE
Makefile.PL
Modified: trunk/libmodule-extract-use-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/META.yml?rev=36000&op=diff
==============================================================================
--- trunk/libmodule-extract-use-perl/META.yml (original)
+++ trunk/libmodule-extract-use-perl/META.yml Wed May 20 22:45:27 2009
@@ -1,12 +1,14 @@
--- #YAML:1.0
name: Module-Extract-Use
-version: 0.13
+version: 0.14
abstract: Extract the modules that a modules uses
author:
- brian d foy <bdfoy at cpan.org>
license: perl
distribution_type: module
configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
ExtUtils::MakeMaker: 0
requires:
PPI: 0
@@ -16,7 +18,7 @@
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.48
+generated_by: ExtUtils::MakeMaker version 6.50
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Modified: trunk/libmodule-extract-use-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/Makefile.PL?rev=36000&op=diff
==============================================================================
--- trunk/libmodule-extract-use-perl/Makefile.PL (original)
+++ trunk/libmodule-extract-use-perl/Makefile.PL Wed May 20 22:45:27 2009
@@ -3,7 +3,7 @@
require 5.006;
-eval "use Test::Manifest 1.14";
+eval "use Test::Manifest 1.21";
WriteMakefile(
'NAME' => 'Module::Extract::Use',
@@ -22,10 +22,6 @@
'lib/Use.pm' => '$(INST_LIBDIR)/Use.pm',
},
- 'MAN3PODS' => {
- 'lib/Use.pm' => '$(INST_MAN3DIR)/Module::Extract::Use.3',
- },
-
clean => { FILES => q|Module-Extract-Use-*| },
);
Modified: trunk/libmodule-extract-use-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/debian/changelog?rev=36000&op=diff
==============================================================================
--- trunk/libmodule-extract-use-perl/debian/changelog (original)
+++ trunk/libmodule-extract-use-perl/debian/changelog Wed May 20 22:45:27 2009
@@ -1,3 +1,14 @@
+libmodule-extract-use-perl (0.14-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ -> Fix to detect 'use' AND compile-time 'require'
+ -> Added an example file
+ * Removed libtest-output-perl from Depends (it's only a B-D-I)
+ * Added libtest-manifest-perl to B-D-I
+ * Removed quilt patch since the whole MAN3PODS line was removed
+
+ -- Jonathan Yu <frequency at cpan.org> Wed, 20 May 2009 18:33:06 -0400
+
libmodule-extract-use-perl (0.13-1) unstable; urgency=low
* Initial Release. (Closes: #526196)
Modified: trunk/libmodule-extract-use-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/debian/control?rev=36000&op=diff
==============================================================================
--- trunk/libmodule-extract-use-perl/debian/control (original)
+++ trunk/libmodule-extract-use-perl/debian/control Wed May 20 22:45:27 2009
@@ -1,10 +1,10 @@
Source: libmodule-extract-use-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7), quilt
+Build-Depends: debhelper (>= 7)
Build-Depends-Indep: libppi-perl (>= 1.203), libtest-output-perl (>= 0.12),
- libtest-pod-perl (>= 1.26), libtest-pod-coverage-perl (>= 1.08),
- perl (>= 5.6.0-12)
+ libtest-pod-perl (>= 1.26), libtest-pod-coverage-perl (>= 1.08),
+ libtest-manifest-perl (>= 1.21), perl (>= 5.6.0-12)
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Jonathan Yu <frequency at cpan.org>
Standards-Version: 3.8.1
@@ -14,8 +14,7 @@
Package: libmodule-extract-use-perl
Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, libppi-perl (>= 1.203),
- libtest-output-perl (>= 0.12)
+Depends: ${misc:Depends}, ${perl:Depends}, libppi-perl (>= 1.203)
Description: Perl module to extract which modules some code uses
Module::Extract::Use extracts the names of the modules used in a file using a
static analysis. It uses PPI (Perl Parsing Interface) to tokenize and extract
Modified: trunk/libmodule-extract-use-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/debian/copyright?rev=36000&op=diff
==============================================================================
--- trunk/libmodule-extract-use-perl/debian/copyright (original)
+++ trunk/libmodule-extract-use-perl/debian/copyright Wed May 20 22:45:27 2009
@@ -5,13 +5,17 @@
Upstream-Name: Module-Extract-Use
Files: *
-Copyright: Copyright (c) 2008, brian d foy, All Rights Reserved.
+Copyright: 2008, brian d foy <bdfoy at cpan.org>
License-Alias: Perl
License: Artistic | GPL-1+
Files: debian/*
Copyright: 2009, Jonathan Yu <frequency at cpan.org>
-License: PD | Artistic | GPL-1+
+License: Artistic | GPL-1+
+
+Files: examples/extract_modules
+Copyright: 2009, Jonathan Yu <frequency at cpan.org>
+License: Artistic | GPL-1+
License: Artistic
This program is free software; you can redistribute it and/or modify
Modified: trunk/libmodule-extract-use-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/debian/rules?rev=36000&op=diff
==============================================================================
--- trunk/libmodule-extract-use-perl/debian/rules (original)
+++ trunk/libmodule-extract-use-perl/debian/rules Wed May 20 22:45:27 2009
@@ -1,13 +1,11 @@
#!/usr/bin/make -f
-include /usr/share/quilt/quilt.make
-
build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
+build-stamp:
TEST_AUTHOR=1 dh build
touch $@
-clean: unpatch
+clean:
# we have to touch Makefile after unpatching Makefile.PL,
# otherwise the latter is newer than the former and
# Makefile gets recreated
Added: trunk/libmodule-extract-use-perl/examples/extract_modules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/examples/extract_modules?rev=36000&op=file
==============================================================================
--- trunk/libmodule-extract-use-perl/examples/extract_modules (added)
+++ trunk/libmodule-extract-use-perl/examples/extract_modules Wed May 20 22:45:27 2009
@@ -1,0 +1,121 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Pod::Usage;
+
+=head1 NAME
+
+extract_modules - determine which Perl modules a given file uses
+
+=head1 VERSION
+
+Version 1.10
+
+=cut
+
+our $VERSION = '1.10';
+
+=head1 SYNOPSIS
+
+Use: extract_modules filename [...]
+
+Given Perl files, extract and report the Perl modules included
+with C<use> or C<require>.
+
+=head1 DESCRIPTION
+
+This script does not execute the code in the files it examines. It
+uses the C<Module::Extract::Use> or C<Module::ExtractUse> modules
+which statically analyze the source without compiling or running it.
+These modules cannot discover modules loaded dynamically through a a
+string eval.
+
+=cut
+
+# if no parameters are passed, give usage information
+unless( @ARGV )
+ {
+ pod2usage( msg => 'Please supply at least one filename to analyze' );
+ exit;
+ }
+
+my( $object, $method );
+my @classes = qw( Module::Extract::Use Module::ExtractUse );
+my %methods = qw(
+ Module::Extract::Use get_modules
+ Module::ExtractUse extract_use
+ );
+
+foreach my $module ( @classes )
+ {
+ eval "require $module";
+ next if $@;
+ ( $object, $method ) = ( $module->new, $methods{$module} );
+ }
+
+die "No usable file scanner module found; exiting...\n" unless defined $object;
+
+
+foreach my $file ( @ARGV )
+ {
+ unless ( -r $file )
+ {
+ printf STDERR "Could not read $file\n";
+ next;
+ }
+
+ dump_list( $file, sort $object->$method( $file ) );
+ }
+
+
+BEGIN {
+my $corelist = eval { require Module::CoreList };
+
+sub dump_list
+ {
+ my( $file, @modules ) = @_;
+
+ printf "Modules required by %s:\n", $file;
+
+ my( $core, $extern ) = ( 0, 0 );
+
+ foreach my $module ( @modules )
+ {
+ printf " - $module%s\n",
+ $corelist
+ ?
+ do {
+ my $v = Module::CoreList->first_release( $module );
+ $core++ if $v;
+ $v ? " (first released with Perl $v)" : '';
+ }
+ :
+ do { $extern++; '' }
+ }
+
+ printf "%d module(s) in core, %d external module(s)\n\n", $core, $extern;
+ }
+
+}
+
+=head1 AUTHORS
+
+Jonathan Yu C<< <frequency at cpan.org> >>
+
+brian d foy C<< <bdfoy at cpan.org> >>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2009 by Jonathan Yu <frequency at cpan.org>
+
+You can use this script under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+L<Module::Extract::Use>,
+L<Module::ExtractUse>,
+L<Module::ScanDeps>,
+
+=cut
Modified: trunk/libmodule-extract-use-perl/lib/Use.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmodule-extract-use-perl/lib/Use.pm?rev=36000&op=diff
==============================================================================
--- trunk/libmodule-extract-use-perl/lib/Use.pm (original)
+++ trunk/libmodule-extract-use-perl/lib/Use.pm Wed May 20 22:45:27 2009
@@ -8,7 +8,7 @@
use subs qw();
use vars qw($VERSION);
-$VERSION = '0.13';
+$VERSION = '0.14';
=head1 NAME
@@ -96,7 +96,8 @@
my $modules = $Document->find(
sub {
- $_[1]->isa( 'PPI::Statement::Include' ) && $_[1]->type eq 'use'
+ $_[1]->isa( 'PPI::Statement::Include' ) &&
+ ( $_[1]->type eq 'use' || $_[1]->type eq 'require' )
}
);
More information about the Pkg-perl-cvs-commits
mailing list