Hello community,
here is the log from the commit of package perl-Module-ScanDeps for
openSUSE:Factory checked in at 2013-01-10 22:30:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Module-ScanDeps (Old)
and /work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Module-ScanDeps", Maintainer is ""
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Module-ScanDeps/perl-Module-ScanDeps.changes
2011-12-06 13:52:50.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new/perl-Module-ScanDeps.changes
2013-01-10 22:30:32.000000000 +0100
@@ -1,0 +2,39 @@
+Thu Jan 10 12:13:29 CET 2013 - [email protected]
+
+- update to 1.10:
+ * add %Preload rule for Params::Validate to detect
+ its PP and XS implementations
+
+ * Fix RT #80276 Module DateTime::Format::ISO8601 generates error
+ after being packaged
+ - caused by failing to pack DateTime::Format::Builder::Parser::XXX modules
+ needed by DateTime::Format::Builder::Parser
+ - add a corresponding %Preload rule
+
+- update to 1.09:
+ * teach Module::ScanDeps about "use if ..." constructs
+ - fixes CPAN Testers failures for PAR::Packer with perl 5.17.1 and up
+ (Roderich Schupp)
+
+ * RT #79003: t/7-check-dynaloader.t failing when /usr/lib != /usr/lib64
+ - scrap the test for "$entry{file} starts with $expected_prefix" as
+ its assumptions are flawed (Roderich Schupp)
+
+ * Mojo::Base is a loader (Alexandr Ciornii)
+ * Special case for Class::Load (Alexandr Ciornii)
+
+- update to 1.08:
+ * RT #73785: scandeps -c fails on modules that depend on Getopt::Euclid
+ - for "scandeps -c ..." switch from an INIT block to a CHECK block
+ and call the augmented script with "perl -c" instaed of "perl"
+
+ * RT#72954 ":encoding(UTF-8)" doesn't imply a dependency on Encode.pm
+ - if scan_chunk sees ":encoding(FOO)" or similar, it goes to some
+ length to find the "external" Encode module to handle FOO; but it
+ forgets that Encode.pm itself is needed at runtime (esp. if FOO
+ is an encoding "internally" handled by Encode.pm, e.g. "UTF-8")
+
+ * %Preload: add rules for Gtk2.pm and Pango.pm
+ * %Preload: fix a problem with Image::ExifTool
+
+-------------------------------------------------------------------
Old:
----
Module-ScanDeps-1.07.tar.gz
New:
----
Module-ScanDeps-1.10.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Module-ScanDeps.spec ++++++
--- /var/tmp/diff_new_pack.Yn4H0d/_old 2013-01-10 22:30:33.000000000 +0100
+++ /var/tmp/diff_new_pack.Yn4H0d/_new 2013-01-10 22:30:33.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Module-ScanDeps
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,15 +16,14 @@
#
-
Name: perl-Module-ScanDeps
-Version: 1.07
-Release: 1
-License: GPL-1.0+ or Artistic-1.0
+Version: 1.10
+Release: 0
%define cpan_name Module-ScanDeps
Summary: Recursively scan Perl code for dependencies
-Url: http://search.cpan.org/dist/Module-ScanDeps/
+License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
+Url: http://search.cpan.org/dist/Module-ScanDeps/
Source:
http://www.cpan.org/authors/id/R/RS/RSCHUPP/%{cpan_name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl >= 5.8.1
++++++ Module-ScanDeps-1.07.tar.gz -> Module-ScanDeps-1.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/Changes
new/Module-ScanDeps-1.10/Changes
--- old/Module-ScanDeps-1.07/Changes 2011-11-29 18:43:08.000000000 +0100
+++ new/Module-ScanDeps-1.10/Changes 2012-10-20 16:07:20.000000000 +0200
@@ -1,3 +1,41 @@
+[Changes for 1.10 - 2012-10-20]
+* add %Preload rule for Params::Validate to detect
+ its PP and XS implementations
+
+* Fix RT #80276 Module DateTime::Format::ISO8601 generates error
+ after being packaged
+ - caused by failing to pack DateTime::Format::Builder::Parser::XXX modules
+ needed by DateTime::Format::Builder::Parser
+ - add a corresponding %Preload rule
+
+* update to Module::Install 1.06
+
+[Changes for 1.09 - 2012-09-09]
+* teach Module::ScanDeps about "use if ..." constructs
+ - fixes CPAN Testers failures for PAR::Packer with perl 5.17.1 and up
+ (Roderich Schupp)
+
+* RT #79003: t/7-check-dynaloader.t failing when /usr/lib != /usr/lib64
+ - scrap the test for "$entry{file} starts with $expected_prefix" as
+ its assumptions are flawed (Roderich Schupp)
+
+* Mojo::Base is a loader (Alexandr Ciornii)
+* Special case for Class::Load (Alexandr Ciornii)
+
+[Changes for 1.08 - 2012-02-21]
+* RT #73785: scandeps -c fails on modules that depend on Getopt::Euclid
+ - for "scandeps -c ..." switch from an INIT block to a CHECK block
+ and call the augmented script with "perl -c" instaed of "perl"
+
+* RT#72954 ":encoding(UTF-8)" doesn't imply a dependency on Encode.pm
+ - if scan_chunk sees ":encoding(FOO)" or similar, it goes to some
+ length to find the "external" Encode module to handle FOO; but it
+ forgets that Encode.pm itself is needed at runtime (esp. if FOO
+ is an encoding "internally" handled by Encode.pm, e.g. "UTF-8")
+
+* %Preload: add rules for Gtk2.pm and Pango.pm
+* %Preload: fix a problem with Image::ExifTool
+
[Changes for 1.07 - 2011-11-29]
* RT #72796: dynaloader test fails when the .so files are in the
system lib dirs and local::lib is involved?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/META.yml
new/Module-ScanDeps-1.10/META.yml
--- old/Module-ScanDeps-1.07/META.yml 2011-11-29 18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/META.yml 2012-10-20 15:55:30.000000000 +0200
@@ -3,13 +3,13 @@
author:
- 'Audrey Tang <[email protected]>'
build_requires:
- ExtUtils::MakeMaker: 6.57
+ ExtUtils::MakeMaker: 6.59
Test::More: 0
configure_requires:
- ExtUtils::MakeMaker: 6.57
+ ExtUtils::MakeMaker: 6.59
distribution_type: module
dynamic_config: 1
-generated_by: 'Module::Install version 1.04'
+generated_by: 'Module::Install version 1.06'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -31,4 +31,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://svn.openfoundry.org/par/Module-ScanDeps/trunk/
-version: 1.07
+version: 1.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/inc/Module/Install/Base.pm
new/Module-ScanDeps-1.10/inc/Module/Install/Base.pm
--- old/Module-ScanDeps-1.07/inc/Module/Install/Base.pm 2011-11-29
18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/inc/Module/Install/Base.pm 2012-10-20
15:55:29.000000000 +0200
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.04';
+ $VERSION = '1.06';
}
# Suspend handler for "redefined" warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/inc/Module/Install/Can.pm
new/Module-ScanDeps-1.10/inc/Module/Install/Can.pm
--- old/Module-ScanDeps-1.07/inc/Module/Install/Can.pm 2011-11-29
18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/inc/Module/Install/Can.pm 2012-10-20
15:55:29.000000000 +0200
@@ -3,13 +3,12 @@
use strict;
use Config ();
-use File::Spec ();
use ExtUtils::MakeMaker ();
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.04';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -29,7 +28,7 @@
eval { require $mod; $pkg->VERSION($ver || 0); 1 };
}
-# check if we can run some command
+# Check if we can run some command
sub can_run {
my ($self, $cmd) = @_;
@@ -38,14 +37,88 @@
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
next if $dir eq '';
- my $abs = File::Spec->catfile($dir, $_[1]);
+ require File::Spec;
+ my $abs = File::Spec->catfile($dir, $cmd);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
return;
}
-# can we locate a (the) C compiler
+# Can our C compiler environment build XS files
+sub can_xs {
+ my $self = shift;
+
+ # Ensure we have the CBuilder module
+ $self->configure_requires( 'ExtUtils::CBuilder' => 0.27 );
+
+ # Do we have the configure_requires checker?
+ local $@;
+ eval "require ExtUtils::CBuilder;";
+ if ( $@ ) {
+ # They don't obey configure_requires, so it is
+ # someone old and delicate. Try to avoid hurting
+ # them by falling back to an older simpler test.
+ return $self->can_cc();
+ }
+
+ # Do we have a working C compiler
+ my $builder = ExtUtils::CBuilder->new(
+ quiet => 1,
+ );
+ unless ( $builder->have_compiler ) {
+ # No working C compiler
+ return 0;
+ }
+
+ # Write a C file representative of what XS becomes
+ require File::Temp;
+ my ( $FH, $tmpfile ) = File::Temp::tempfile(
+ "compilexs-XXXXX",
+ SUFFIX => '.c',
+ );
+ binmode $FH;
+ print $FH <<'END_C';
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+int main(int argc, char **argv) {
+ return 0;
+}
+
+int boot_sanexs() {
+ return 1;
+}
+
+END_C
+ close $FH;
+
+ # Can the C compiler access the same headers XS does
+ my @libs = ();
+ my $object = undef;
+ eval {
+ local $^W = 0;
+ $object = $builder->compile(
+ source => $tmpfile,
+ );
+ @libs = $builder->link(
+ objects => $object,
+ module_name => 'sanexs',
+ );
+ };
+ my $result = $@ ? 0 : 1;
+
+ # Clean up all the build files
+ foreach ( $tmpfile, $object, @libs ) {
+ next unless defined $_;
+ 1 while unlink;
+ }
+
+ return $result;
+}
+
+# Can we locate a (the) C compiler
sub can_cc {
my $self = shift;
my @chunks = split(/ /, $Config::Config{cc}) or return;
@@ -78,4 +151,4 @@
__END__
-#line 156
+#line 236
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/inc/Module/Install/Fetch.pm
new/Module-ScanDeps-1.10/inc/Module/Install/Fetch.pm
--- old/Module-ScanDeps-1.07/inc/Module/Install/Fetch.pm 2011-11-29
18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/inc/Module/Install/Fetch.pm 2012-10-20
15:55:29.000000000 +0200
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.04';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/inc/Module/Install/Makefile.pm
new/Module-ScanDeps-1.10/inc/Module/Install/Makefile.pm
--- old/Module-ScanDeps-1.07/inc/Module/Install/Makefile.pm 2011-11-29
18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/inc/Module/Install/Makefile.pm 2012-10-20
15:55:29.000000000 +0200
@@ -8,7 +8,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.04';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -215,13 +215,17 @@
require ExtUtils::MakeMaker;
if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
- # MakeMaker can complain about module versions that include
- # an underscore, even though its own version may contain one!
- # Hence the funny regexp to get rid of it. See RT #35800
- # for details.
- my ($v) = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
- $self->build_requires( 'ExtUtils::MakeMaker' => $v );
- $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
+ # This previous attempted to inherit the version of
+ # ExtUtils::MakeMaker in use by the module author, but this
+ # was found to be untenable as some authors build releases
+ # using future dev versions of EU:MM that nobody else has.
+ # Instead, #toolchain suggests we use 6.59 which is the most
+ # stable version on CPAN at time of writing and is, to quote
+ # ribasushi, "not terminally fucked, > and tested enough".
+ # TODO: We will now need to maintain this over time to push
+ # the version up as new versions are released.
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.59 );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
} else {
# Allow legacy-compatibility with 5.005 by depending on the
# most recent EU:MM that supported 5.005.
@@ -411,4 +415,4 @@
__END__
-#line 540
+#line 544
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/inc/Module/Install/Metadata.pm
new/Module-ScanDeps-1.10/inc/Module/Install/Metadata.pm
--- old/Module-ScanDeps-1.07/inc/Module/Install/Metadata.pm 2011-11-29
18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/inc/Module/Install/Metadata.pm 2012-10-20
15:55:29.000000000 +0200
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.04';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/inc/Module/Install/Scripts.pm
new/Module-ScanDeps-1.10/inc/Module/Install/Scripts.pm
--- old/Module-ScanDeps-1.07/inc/Module/Install/Scripts.pm 2011-11-29
18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/inc/Module/Install/Scripts.pm 2012-10-20
15:55:29.000000000 +0200
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.04';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/inc/Module/Install/Win32.pm
new/Module-ScanDeps-1.10/inc/Module/Install/Win32.pm
--- old/Module-ScanDeps-1.07/inc/Module/Install/Win32.pm 2011-11-29
18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/inc/Module/Install/Win32.pm 2012-10-20
15:55:29.000000000 +0200
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.04';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/inc/Module/Install/WriteAll.pm
new/Module-ScanDeps-1.10/inc/Module/Install/WriteAll.pm
--- old/Module-ScanDeps-1.07/inc/Module/Install/WriteAll.pm 2011-11-29
18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/inc/Module/Install/WriteAll.pm 2012-10-20
15:55:29.000000000 +0200
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.04';
+ $VERSION = '1.06';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/inc/Module/Install.pm
new/Module-ScanDeps-1.10/inc/Module/Install.pm
--- old/Module-ScanDeps-1.07/inc/Module/Install.pm 2011-11-29
18:57:17.000000000 +0100
+++ new/Module-ScanDeps-1.10/inc/Module/Install.pm 2012-10-20
15:55:29.000000000 +0200
@@ -31,7 +31,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.04';
+ $VERSION = '1.06';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -467,4 +467,4 @@
1;
-# Copyright 2008 - 2011 Adam Kennedy.
+# Copyright 2008 - 2012 Adam Kennedy.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/lib/Module/ScanDeps.pm
new/Module-ScanDeps-1.10/lib/Module/ScanDeps.pm
--- old/Module-ScanDeps-1.07/lib/Module/ScanDeps.pm 2011-11-28
16:51:47.000000000 +0100
+++ new/Module-ScanDeps-1.10/lib/Module/ScanDeps.pm 2012-10-19
19:02:02.000000000 +0200
@@ -4,7 +4,7 @@
use warnings;
use vars qw( $VERSION @EXPORT @EXPORT_OK @ISA $CurrentPackage @IncludeLibs
$ScanFileRE );
-$VERSION = '1.07';
+$VERSION = '1.10';
@EXPORT = qw( scan_deps scan_deps_runtime );
@EXPORT_OK = qw( scan_line scan_chunk add_deps scan_deps_runtime
path_to_inc_name );
@@ -257,6 +257,7 @@
'CGI/Application/Plugin/Authentication.pm' => [qw(
CGI/Application/Plugin/Authentication/Store/Cookie.pm )],
'CGI/Application/Plugin/AutoRunmode.pm' => [qw( Attribute/Handlers.pm )],
+ 'Class/Load.pm' => [qw( Class/Load/PP.pm )],
'Class/MakeMethods.pm' => 'sub',
'Class/MethodMaker.pm' => 'sub',
'Config/Any.pm' =>'sub',
@@ -274,6 +275,7 @@
return (_glob_in_inc('Date/Manip/TZ', 1),
_glob_in_inc('Date/Manip/Offset', 1));
},
+ 'DateTime/Format/Builder/Parser.pm' => 'sub',
'DateTime/Locale.pm' => 'sub',
'DateTime/TimeZone.pm' => 'sub',
'DBI.pm' => sub {
@@ -288,7 +290,7 @@
termios.ph asm/termios.ph sys/termiox.ph sys/termios.ph sys/ttycom.ph
) ],
'Email/Send.pm' => 'sub',
- 'Event.pm' => [ map {"Event/$_.pm" } qw(idle io signal timer var)],
+ 'Event.pm' => [ map "Event/$_.pm", qw(idle io signal timer var)],
'ExtUtils/MakeMaker.pm' => sub {
grep /\bMM_/, _glob_in_inc('ExtUtils', 1);
},
@@ -298,18 +300,21 @@
require File::Spec;
map { my $name = $_; $name =~ s!::!/!g; "$name.pm" } @File::Spec::ISA;
},
+ 'Gtk2.pm' => [qw( Cairo.pm )], # Gtk2.pm does: eval "use Cairo;"
'HTTP/Message.pm' => [ qw(
URI/URL.pm URI.pm
) ],
'Image/ExifTool.pm' => sub {
- return( _glob_in_inc("Image/ExifTool", 1), qw(
- File/RandomAccess.pm
- ));
+ return(
+ (map $_->{name}, _glob_in_inc('Image/ExifTool', 0)), # also *.pl
files
+ qw( File/RandomAccess.pm ),
+ );
},
'Image/Info.pm' => sub {
- return( _glob_in_inc("Image/Info", 1), qw(
- Image/TIFF.pm
- ));
+ return(
+ _glob_in_inc('Image/Info', 1),
+ qw( Image/TIFF.pm ),
+ );
},
'IO.pm' => [ qw(
IO/Handle.pm IO/Seekable.pm IO/File.pm
@@ -326,12 +331,10 @@
'Log/Any.pm' => 'sub',
'Log/Report/Dispatcher.pm' => 'sub',
'LWP/UserAgent.pm' => sub {
- return(
- qw(
- URI/URL.pm URI/http.pm LWP/Protocol/http.pm
- ),
- _glob_in_inc("LWP/Authen", 1),
- _glob_in_inc("LWP/Protocol", 1),
+ return(
+ qw( URI/URL.pm URI/http.pm LWP/Protocol/http.pm ),
+ _glob_in_inc("LWP/Authen", 1),
+ _glob_in_inc("LWP/Protocol", 1),
);
},
'LWP/Parallel.pm' => sub {
@@ -374,8 +377,10 @@
'Net/Server.pm' => 'sub',
'Net/SSH/Perl.pm' => 'sub',
'Package/Stash.pm' => [qw( Package/Stash/PP.pm
Package/Stash/XS.pm )],
+ 'Pango.pm' => [qw( Cairo.pm )], # Pango.pm does: eval
"use Cairo;"
'PAR/Repository.pm' => 'sub',
'PAR/Repository/Client.pm' => 'sub',
+ 'Params/Validate.pm' => 'sub',
'Parse/AFP.pm' => 'sub',
'Parse/Binary.pm' => 'sub',
'Perl/Critic.pm' => 'sub', #not only Perl/Critic/Policy
@@ -390,16 +395,16 @@
_glob_in_inc('POE/Component/Client/HTTP', 1),
qw( POE/Filter/HTTPChunk.pm POE/Filter/HTTPHead.pm ),
},
- 'POE/Kernel.pm' => sub {
+ 'POE/Kernel.pm' => sub {
_glob_in_inc('POE/XS/Resource', 1),
_glob_in_inc('POE/Resource', 1),
_glob_in_inc('POE/XS/Loop', 1),
_glob_in_inc('POE/Loop', 1),
},
'POSIX.pm' => sub {
- map { my $sigmod = $_;
- map "auto/POSIX/$sigmod/$_->{name}",
_glob_in_inc("auto/POSIX/$sigmod");
- } qw( SigAction SigRt )
+ map $_->{name},
+ _glob_in_inc('auto/POSIX/SigAction', 0), # *.al files
+ _glob_in_inc('auto/POSIX/SigRt', 0), # *.al files
},
'PPI.pm' => 'sub',
'Regexp/Common.pm' => 'sub',
@@ -426,7 +431,7 @@
},
'SVN/Core.pm' => sub {
_glob_in_inc('SVN', 1),
- map "auto/SVN/$_->{name}", _glob_in_inc('auto/SVN'),
+ map $_->{name}, _glob_in_inc('auto/SVN', 0), # *.so, *.bs files
},
'Template.pm' => 'sub',
'Term/ReadLine.pm' => 'sub',
@@ -447,7 +452,7 @@
'Unicode/UCD.pm' => sub {
# add data files (cf. sub openunicode in Unicode::UCD)
'unicore/version',
- grep /\.txt$/, map "unicore/$_->{name}", _glob_in_inc('unicore', 0);
+ grep /\.txt$/, map $_->{name}, _glob_in_inc('unicore', 0);
},
'URI.pm' => sub {
grep !/urn/, _glob_in_inc('URI', 1);
@@ -506,7 +511,7 @@
'utf8.pm' => sub {
# Perl 5.6.x: "unicode", Perl 5.8.x and up: "unicore"
my $unicore = _find_in_inc('unicore/Name.pl') ? 'unicore' : 'unicode';
- return ('utf8_heavy.pl', map "$unicore/$_->{name}",
_glob_in_inc($unicore));
+ return ('utf8_heavy.pl', map $_->{name}, _glob_in_inc($unicore, 0));
},
'charnames.pm' => sub {
_find_in_inc('unicore/Name.pl') ? 'unicore/Name.pl' : 'unicode/Name.pl'
@@ -719,7 +724,7 @@
next unless $file =~ $ScanFileRE;
($inchash, $dl_shared_objects, $incarray) = ({}, [], []);
- _compile($perl, $file, $inchash, $dl_shared_objects, $incarray);
+ _compile_or_execute($compile, $perl, $file, $inchash,
$dl_shared_objects, $incarray);
my $rv_sub = _make_rv($inchash, $dl_shared_objects, $incarray);
_merge_rv($rv_sub, $rv);
@@ -730,7 +735,7 @@
my $exc;
foreach $exc (@$excarray) {
($inchash, $dl_shared_objects, $incarray) = ({}, [], []);
- _execute($perl, $exc, $inchash, $dl_shared_objects, $incarray);
+ _compile_or_execute($compile, $perl, $exc, $inchash,
$dl_shared_objects, $incarray);
}
# XXX only retains data from last execute ... Why? I suspect
@@ -806,11 +811,12 @@
}
}
- if (my ($autouse) = /^use \s+ autouse \s+ (["'].*?["']|\w+)/x)
+ if (my ($pragma, $args) = /^use \s+ (autouse|if) \s+ (.+)/x)
{
- $autouse =~ s/["']//g;
- $autouse =~ s{::}{/}g;
- return ("autouse.pm", "$autouse.pm");
+ my @args = do { no strict; no warnings; eval $args };
+ my $module = $pragma eq "autouse" ? $args[0] : $args[1];
+ $module =~ s{::}{/}g;
+ return ("$pragma.pm", "$module.pm");
}
if (my ($how, $libs) = /^(use \s+ lib \s+ | (?:unshift|push) \s+ \@INC
\s+ ,) (.+)/x)
@@ -877,7 +883,7 @@
# TODO: There's many more of these "loader" type modules on CPAN!
# scan for the typical module-loader modules
- my $loaders = "asa base parent prefork POE encoding maybe
only::matching";
+ my $loaders = "asa base parent prefork POE encoding maybe
only::matching Mojo::Base";
# grab pre-calculated regexp or re-build it (and cache it)
my $loader_regexp = $LoaderRegexp{$loaders} ||
_build_loader_regexp($loaders);
if ($_ =~ $loader_regexp) { # $1 == loader, $2 == loadee
@@ -914,8 +920,10 @@
return "DBD/$1.pm" if /\b[Dd][Bb][Ii]:(\w+):/;
if (/(?:(:encoding)|\b(?:en|de)code)\(\s*['"]?([-\w]+)/) {
my $mod = _find_encoding($2);
- return [ 'PerlIO.pm', $mod ] if $1 and $mod;
- return $mod if $mod;
+ my @mods = ( 'Encoding.pm' ); # always needed
+ push @mods, 'PerlIO.pm' if $1; # needed for ":encoding(...)"
+ push @mods, $mod if $mod; # "external" Encode module
+ return \@mods;
}
return $1 if /^(?:do|require)\s+[^"]*"(.*?)"/;
return $1 if /^(?:do|require)\s+[^']*'(.*?)'/;
@@ -1053,7 +1061,7 @@
foreach (_glob_in_inc("auto/$path")) {
next if $_->{file} =~ m{\bauto/$path/.*/}; # weed out subdirs
- next if $_->{name} =~ m/(?:^|\/)\.(?:exists|packlist)$/;
+ next if $_->{name} =~ m{/\.(?:exists|packlist)$};
my ($ext,$type);
$ext = lc($1) if $_->{name} =~ /(\.[^.]+)$/;
if (defined $ext) {
@@ -1063,7 +1071,7 @@
}
$type ||= 'data';
- _add_info( rv => $rv, module =>
"auto/$path/$_->{name}",
+ _add_info( rv => $rv, module => $_->{name},
file => $_->{file}, used_by => $module,
type => $type );
}
@@ -1075,12 +1083,12 @@
# TODO: get real distribution name related to module name
my $distname = $modname;
foreach (_glob_in_inc("auto/share/module/$modname")) {
- _add_info( rv => $rv, module =>
"auto/share/module/$modname/$_->{name}",
+ _add_info( rv => $rv, module => $_->{name},
file => $_->{file}, used_by => $module,
type => 'data' );
}
foreach (_glob_in_inc("auto/share/dist/$distname")) {
- _add_info( rv => $rv, module =>
"auto/share/dist/$distname/$_->{name}",
+ _add_info( rv => $rv, module => $_->{name},
file => $_->{file}, used_by => $module,
type => 'data' );
}
@@ -1112,19 +1120,17 @@
$subdir =~ s/\$CurrentPackage/$CurrentPackage/;
- foreach my $dir (map "$_/$subdir", grep !/\bBSDPAN\b/, @INC, @IncludeLibs)
{
+ foreach my $inc (grep !/\bBSDPAN\b/, @INC, @IncludeLibs) {
+ my $dir = "$inc/$subdir";
next unless -d $dir;
File::Find::find(
sub {
- my $name = $File::Find::name;
- $name =~ s!^\Q$dir\E/!!;
- return if $pm_only and lc($name) !~ /\.p[mh]$/i;
+ return unless -f;
+ return if $pm_only and !/\.p[mh]$/i;
+ (my $name = $File::Find::name) =~ s!^\Q$inc\E/!!;
push @files, $pm_only
- ? "$subdir/$name"
- : { file => $File::Find::name,
- name => $name,
- }
- if -f;
+ ? $name
+ : { file => $File::Find::name, name => $name };
},
$dir
);
@@ -1232,11 +1238,8 @@
# scan_deps_runtime utility functions
-sub _compile { _compile_or_execute(1, @_) }
-sub _execute { _compile_or_execute(0, @_) }
-
sub _compile_or_execute {
- my ($do_compile, $perl, $file, $inchash, $dl_shared_objects, $incarray) =
@_;
+ my ($compile, $perl, $file, $inchash, $dl_shared_objects, $incarray) = @_;
require Module::ScanDeps::DataFeed;
# ... so we can find it's full pathname in %INC
@@ -1250,14 +1253,14 @@
# NOTE: We don't directly assign to $0 as it has magic (i.e.
# assigning has side effects and may actually fail, cf. perlvar(1)).
# Instead we alias *0 to a package variable holding the correct value.
- print $feed_fh "BEGIN { ",
+ print $feed_fh "BEGIN {\n",
Data::Dumper->Dump([ $file ], [
"Module::ScanDeps::DataFeed::_0" ]),
- "*0 = \\\$Module::ScanDeps::DataFeed::_0; }\n";
+ "*0 = \\\$Module::ScanDeps::DataFeed::_0;\n",
+ "}\n";
- print $feed_fh $do_compile ? "INIT {\n" : "END {\n";
- # NOTE: When compiling the block will run _after_ all CHECK blocks
- # (but _before_ the first INIT block) and will terminate the program.
- # When executing the block will run as the first END block and
+ print $feed_fh $compile ? "CHECK {\n" : "END {\n";
+ # NOTE: When compiling the block will run as the last CHECK block;
+ # when executing the block will run as the first END block and
# the programs continues.
# correctly escape strings containing filenames
@@ -1265,20 +1268,19 @@
[ $INC{"Module/ScanDeps/DataFeed.pm"}, $dump_file ],
[ qw( datafeedpm dump_file ) ]);
- print $feed_fh <<'...';
# save %INC etc so that further requires dont't pollute them
+ print $feed_fh <<'...';
%Module::ScanDeps::DataFeed::_INC = %INC;
@Module::ScanDeps::DataFeed::_INC = @INC;
@Module::ScanDeps::DataFeed::_dl_shared_objects =
@DynaLoader::dl_shared_objects;
@Module::ScanDeps::DataFeed::_dl_modules = @DynaLoader::dl_modules;
- require $datafeedpm;
+ require $datafeedpm;
Module::ScanDeps::DataFeed::_dump_info($dump_file);
+}
...
- print $feed_fh $do_compile ? "exit(0);\n}\n" : "}\n";
-
# append the file to compile
{
open my $fhin, "<", $file or die "Couldn't open $file: $!";
@@ -1288,14 +1290,19 @@
close $feed_fh;
File::Path::rmtree( ['_Inline'], 0, 1); # XXX hack
- my $rc = system($perl, (map { "-I$_" } @IncludeLibs), $feed_file);
+
+ my @cmd = ($perl);
+ push @cmd, "-c" if $compile;
+ push @cmd, map { "-I$_" } @IncludeLibs;
+ my $rc = system(@cmd, $feed_file);
- _extract_info($dump_file, $inchash, $dl_shared_objects, $incarray) if $rc
== 0;
+ _extract_info($dump_file, $inchash, $dl_shared_objects, $incarray)
+ if $rc == 0;
unlink($feed_file, $dump_file);
- die $do_compile
- ? "SYSTEM ERROR in compiling $file: $rc"
- : "SYSTEM ERROR in executing $file: $rc"
- unless $rc == 0;
+ die $compile
+ ? "SYSTEM ERROR in compiling $file: $rc"
+ : "SYSTEM ERROR in executing $file: $rc"
+ unless $rc == 0;
}
# create a new hashref, applying fixups
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/t/14-scan_chunk.t
new/Module-ScanDeps-1.10/t/14-scan_chunk.t
--- old/Module-ScanDeps-1.07/t/14-scan_chunk.t 2011-11-28 15:19:48.000000000
+0100
+++ new/Module-ScanDeps-1.10/t/14-scan_chunk.t 2012-09-04 22:38:32.000000000
+0200
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 6;
+use Test::More tests => 7;
use Module::ScanDeps qw/scan_chunk/;
{
@@ -40,6 +40,14 @@
{
my $chunk=<<'EOT';
+use Mojo::Base 'strict';
+EOT
+my @array=sort(scan_chunk($chunk));
+is_deeply(\@array,[sort qw{Mojo/Base.pm strict.pm}],'Mojo::Base');
+}
+
+{
+my $chunk=<<'EOT';
use Catalyst qw/-Debug ConfigLoader Session::State::Cookie/
EOT
#-Debug should be skipped
@@ -51,7 +59,6 @@
my $chunk=<<'EOT';
use I18N::LangTags 0.30 ();
EOT
-#-Debug should be skipped
my @array=sort(scan_chunk($chunk));
is_deeply(\@array,[sort qw{I18N/LangTags.pm}]);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.07/t/7-check-dynaloader.t
new/Module-ScanDeps-1.10/t/7-check-dynaloader.t
--- old/Module-ScanDeps-1.07/t/7-check-dynaloader.t 2011-11-29
18:13:13.000000000 +0100
+++ new/Module-ScanDeps-1.10/t/7-check-dynaloader.t 2012-09-04
22:38:32.000000000 +0200
@@ -65,6 +65,7 @@
exit(0);
+# NOTE: check_bundle_path runs 2 tests
sub check_bundle_path {
my ($module, $auto_path, $suffix, $code, $scan) = @_;
@@ -74,29 +75,11 @@
my $rv = $scan->($filename);
my ( $entry ) = grep { /^\Q$auto_path\E$/ } keys %$rv;
- ok( $entry, "$module: we have some key that looks like it pulled in its
shared lib" );
+ ok( $entry, "$module: found some key that looks like it pulled in its
shared lib (auto_path=$auto_path)" );
-
- # Look up what %INC knows about Foo::Bar after require'ing it,
- # then make an educated guess about the location of its shared library.
- # If the module Foo::Bar was found as /some/path/Foo/Bar.pm,
- # assume its shared library is in /some/path/auto/Foo/Bar/Bar.$dlext
- # or /some/path/ARCH/auto/Foo/Bar/Bar.$dlext
- (my $pm = $module.".pm") =~ s,::,/,g;
- (my $expected_prefix = $INC{$pm}) =~ s,/\Q$pm\E$,,;
-
- # NOTE: This behaviour is not really guaranteed by the way DynaLoader
- # works, but it is a reasonable assumption for any module installed
- # by ExtUtils::MakeMaker. But it fails when the module wasn't installed,
- # but located via blib (where the pm file is below blib/lib, but the
- # corresponding shared library is below blib/arch). CPAN Testers does this.
- $expected_prefix =~ s,blib/lib,blib/arch,;
-
- # Actually we accept anything that starts with $expected_prefix
- # and ends with $auto_path.
- ok( $rv->{$entry}->{file} =~ m{^\Q$expected_prefix\E/}
- && $rv->{$entry}->{file} =~ m{/\Q$auto_path\E$},
- 'the full bundle path we got looks legit' );
+ # Actually we accept anything that ends with $auto_path.
+ ok($rv->{$entry}->{file} =~ m{/\Q$auto_path\E$},
+ "$module: the full bundle path we got ($rv->{$entry}->{file}) looks
legit" );
}
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]