r57158 - /trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Fri Apr 30 05:01:10 UTC 2010
Author: dmn
Date: Fri Apr 30 05:00:55 2010
New Revision: 57158
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=57158
Log:
use Module::Build::ModuleInfo for determining which modules live in which .pm
it is nice when the grunt work was already done by
someone else :)
Modified:
trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm
Modified: trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm?rev=57158&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm Fri Apr 30 05:00:55 2010
@@ -57,6 +57,7 @@
use File::Path ();
use File::Spec::Functions qw( catfile );
use Module::Depends ();
+use Module::Build::ModuleInfo;
use Text::Wrap qw( wrap );
sub check_deprecated_overrides {
@@ -494,15 +495,9 @@
return;
}
if (/.+\.pm$/) {
- open my $fh, '<', $File::Find::name
- or die "open($File::Find::name): $!";
-
- while ( defined( my $l = <$fh> ) ) {
- if ( $l =~ /^\s*package\s+(\w[\w\d_:]+).*;/ ) {
- push @modules, $1;
- last;
- }
- }
+ my $mi = Module::Build::ModuleInfo->new_from_file(
+ $File::Find::name);
+ push @modules, $mi->packages_inside;
}
},
$self->main_dir,
More information about the Pkg-perl-cvs-commits
mailing list