diff -Nru libimport-into-perl-1.002004/Changes libimport-into-perl-1.002005/Changes --- libimport-into-perl-1.002004/Changes 2014-07-09 16:25:28.000000000 +0000 +++ libimport-into-perl-1.002005/Changes 2015-08-28 00:29:48.000000000 +0000 @@ -1,5 +1,8 @@ Revision history for Import-Into +1.002005 - 2015-08-28 + - fix level as a hashref parameter + 1.002004 - 2014-07-09 - fix prerequisite declarations for older toolchain diff -Nru libimport-into-perl-1.002004/debian/changelog libimport-into-perl-1.002005/debian/changelog --- libimport-into-perl-1.002004/debian/changelog 2014-07-12 12:51:50.000000000 +0000 +++ libimport-into-perl-1.002005/debian/changelog 2015-10-18 15:43:18.000000000 +0000 @@ -1,3 +1,20 @@ +libimport-into-perl (1.002005-1) unstable; urgency=medium + + * Team upload. + + [ Salvatore Bonaccorso ] + * Update Vcs-Browser URL to cgit web frontend + + [ gregor herrmann ] + * Add debian/upstream/metadata. + * Import upstream version 1.002005. + * Mark package as autopkgtest-able. + * Fix typo in long description. Thanks to lintian. + * Bump debhelper compatibility level to 9. + * Declare compliance with Debian Policy 3.9.6. + + -- gregor herrmann Sun, 18 Oct 2015 17:42:58 +0200 + libimport-into-perl (1.002004-1) unstable; urgency=medium * Team upload. diff -Nru libimport-into-perl-1.002004/debian/compat libimport-into-perl-1.002005/debian/compat --- libimport-into-perl-1.002004/debian/compat 2014-07-12 12:51:50.000000000 +0000 +++ libimport-into-perl-1.002005/debian/compat 2015-10-18 15:43:18.000000000 +0000 @@ -1 +1 @@ -8 +9 diff -Nru libimport-into-perl-1.002004/debian/control libimport-into-perl-1.002005/debian/control --- libimport-into-perl-1.002004/debian/control 2014-07-12 12:51:50.000000000 +0000 +++ libimport-into-perl-1.002005/debian/control 2015-10-18 15:43:18.000000000 +0000 @@ -2,12 +2,13 @@ Maintainer: Debian Perl Group Uploaders: Nuno Carvalho Section: perl +Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper (>= 8) +Build-Depends: debhelper (>= 9) Build-Depends-Indep: perl, libmodule-runtime-perl -Standards-Version: 3.9.5 -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libimport-into-perl.git +Standards-Version: 3.9.6 +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libimport-into-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libimport-into-perl.git Homepage: https://metacpan.org/release/Import-Into @@ -19,7 +20,7 @@ Description: module for importing packages into other packages Import::Into creates a global method import::into which you can call on any package to import it into another package. This is useful because - there are many diferent ways to write exporters: some use Exporter, some + there are many different ways to write exporters: some use Exporter, some use Sub::Exporter, some use Moose::Exporter, some use Exporter::Declare and some things are pragmas. . diff -Nru libimport-into-perl-1.002004/debian/upstream/metadata libimport-into-perl-1.002005/debian/upstream/metadata --- libimport-into-perl-1.002004/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ libimport-into-perl-1.002005/debian/upstream/metadata 2015-10-18 15:43:18.000000000 +0000 @@ -0,0 +1,8 @@ +--- +Archive: CPAN +Bug-Database: https://rt.cpan.org/Public/Dist/Display.html?Name=Import-Into +Bug-Submit: bug-Import-Into@rt.cpan.org +Contact: mst - Matt S. Trout (cpan:MSTROUT) +Name: Import-Into +Repository: git://git.shadowcat.co.uk/p5sagit/Import-Into.git +Repository-Browse: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Import-Into.git diff -Nru libimport-into-perl-1.002004/lib/Import/Into.pm libimport-into-perl-1.002005/lib/Import/Into.pm --- libimport-into-perl-1.002004/lib/Import/Into.pm 2014-07-09 16:14:56.000000000 +0000 +++ libimport-into-perl-1.002005/lib/Import/Into.pm 2015-08-28 00:29:43.000000000 +0000 @@ -4,12 +4,12 @@ use warnings FATAL => 'all'; use Module::Runtime; -our $VERSION = '1.002004'; +our $VERSION = '1.002005'; sub _prelude { my $target = shift; my ($package, $file, $line, $level) - = ref $target ? @{$target}{qw(package filename line)} + = ref $target ? @{$target}{qw(package filename line level)} : $target =~ /[^0-9]/ ? ($target) : (undef, undef, undef, $target); if (defined $level) { @@ -25,9 +25,13 @@ sub _make_action { my ($action, $target) = @_; my $version = ref $target && $target->{version}; - my $ver_check = $version ? ', $version' : ''; eval _prelude($target) - . qq{sub { Module::Runtime::use_module( shift$ver_check )->$action(\@_) }} + . q[sub {] + . q[ my $module = shift;] + . q[ Module::Runtime::require_module($module);] + . (ref $target && exists $target->{version} ? q[ $module->VERSION($version);] : q[]) + . q[ $module->].$action.q[(@_);] + . q[}] or die "Failed to build action sub to ${action} for ${target}: $@"; } diff -Nru libimport-into-perl-1.002004/maint/bump-version libimport-into-perl-1.002005/maint/bump-version --- libimport-into-perl-1.002004/maint/bump-version 2014-07-09 00:05:59.000000000 +0000 +++ libimport-into-perl-1.002005/maint/bump-version 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#!/usr/bin/env perl - -use 5.010; -use strict; -use warnings FATAL => 'all'; -use autodie; - -chomp(my $LATEST = qx(grep '^[0-9]' Changes | head -1 | awk '{print \$1}')); - -my @parts = map { m/(\d{1,3})/g } split /\./, $LATEST; -push @parts, 0, 0; - -my $OLD_DECIMAL = sprintf('%i.%03i%03i', @parts); - -my %bump_part = (major => 0, minor => 1, bugfix => 2); - -my $bump_this = - $bump_part{$ARGV[0]||'bugfix'} - // die "no idea which part to bump - $ARGV[0] means nothing to me"; - -my @new_parts = @parts; - -$new_parts[$bump_this]++; - -my $NEW_DECIMAL = sprintf('%i.%03i%03i', @new_parts); - -my @PM_FILES = ( 'lib/Import/Into.pm' ); - -foreach my $filename (@PM_FILES) { - warn "Bumping $OLD_DECIMAL -> $NEW_DECIMAL in $filename\n"; - - my $file = do { local (@ARGV, $/) = ($filename); <> }; - - $file =~ s/(?<=\$VERSION = ')${\quotemeta $OLD_DECIMAL}/${NEW_DECIMAL}/; - - open my $out, '>', $filename; - - print $out $file; -} diff -Nru libimport-into-perl-1.002004/maint/Makefile.include libimport-into-perl-1.002005/maint/Makefile.include --- libimport-into-perl-1.002004/maint/Makefile.include 2014-07-04 01:32:13.000000000 +0000 +++ libimport-into-perl-1.002005/maint/Makefile.include 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -bump: - maint/bump-version - rm Makefile -bumpminor: - maint/bump-version minor - rm Makefile -bumpmajor: - maint/bump-version major - rm Makefile -upload: $(DISTVNAME).tar$(SUFFIX) - cpan-upload $< diff -Nru libimport-into-perl-1.002004/Makefile.PL libimport-into-perl-1.002005/Makefile.PL --- libimport-into-perl-1.002004/Makefile.PL 2014-07-09 16:10:52.000000000 +0000 +++ libimport-into-perl-1.002005/Makefile.PL 2014-08-21 15:47:12.000000000 +0000 @@ -1,82 +1,88 @@ use strict; use warnings FATAL => 'all'; -use ExtUtils::MakeMaker; -(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; -my %WriteMakefileArgs = ( - NAME => 'Import::Into', - VERSION_FROM => 'lib/Import/Into.pm', - PREREQ_PM => { }, - LICENSE => 'perl', - - META_MERGE => { - 'meta-spec' => { version => 2 }, - dynamic_config => 0, - resources => { - # r/w: p5sagit@git.shadowcat.co.uk:Import-Into.git - repository => { - url => 'git://git.shadowcat.co.uk/p5sagit/Import-Into.git', - web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Import-Into.git', - type => 'git', - }, - bugtracker => { - mailto => 'bug-Import-Into@rt.cpan.org', - web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Import-Into', - }, +my %META = ( + name => 'Import-Into', + license => 'perl_5', + dynamic_config => 0, + resources => { + # r/w: p5sagit@git.shadowcat.co.uk:Import-Into.git + repository => { + url => 'git://git.shadowcat.co.uk/p5sagit/Import-Into.git', + web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Import-Into.git', + type => 'git', + }, + bugtracker => { + mailto => 'bug-Import-Into@rt.cpan.org', + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Import-Into', }, }, - - META_ADD => { - prereqs => { - runtime => { - requires => { - 'strict' => '0', - 'warnings' => '0', - 'Module::Runtime' => '0', - 'perl' => '5.006', - }, + prereqs => { + configure => { + requires => { + 'ExtUtils::MakeMaker' => 0, + }, + }, + runtime => { + requires => { + 'strict' => '0', + 'warnings' => '0', + 'Module::Runtime' => '0', + 'perl' => '5.006', }, - test => { - requires => { - 'Exporter' => '0', - 'base' => '0', - 'Test::More' => '0', - }, + }, + test => { + requires => { + 'Exporter' => '0', + 'base' => '0', + 'Test::More' => '0', }, }, }, +); - realclean => { FILES => [ 'Distar/', 'MANIFEST*' ] }, +my %MM_ARGS = ( ); +## BOILERPLATE ############################################################### +require ExtUtils::MakeMaker; +(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; + +# have to do this since old EUMM dev releases miss the eval $VERSION line my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; +my $mymeta = $eumm_version >= 6.57_02; +my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; + +($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; +($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; +$META{license} = [ $META{license} ] + if $META{license} && !ref $META{license}; +$MM_ARGS{LICENSE} = $META{license}[0] + if $META{license} && $eumm_version >= 6.30; +$MM_ARGS{NO_MYMETA} = 1 + if $mymeta_broken; +$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } + unless -f 'META.yml'; for (qw(configure build test runtime)) { my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; - next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_} - or exists $WriteMakefileArgs{$key}; - my $r = $WriteMakefileArgs{$key} = { - %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}}, - %{delete $WriteMakefileArgs{$key} || {}}, + my $r = $MM_ARGS{$key} = { + %{$META{prereqs}{$_}{requires} || {}}, + %{delete $MM_ARGS{$key} || {}}, }; defined $r->{$_} or delete $r->{$_} for keys %$r; } -# dynamic prereqs get added here. - -$WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0; - -$WriteMakefileArgs{BUILD_REQUIRES} = { - %{$WriteMakefileArgs{BUILD_REQUIRES} || {}}, - %{delete $WriteMakefileArgs{TEST_REQUIRES}} -} if $eumm_version < 6.63_03; - -$WriteMakefileArgs{PREREQ_PM} = { - %{$WriteMakefileArgs{PREREQ_PM}}, - %{delete $WriteMakefileArgs{BUILD_REQUIRES}} -} if $eumm_version < 6.55_01; +$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; -delete $WriteMakefileArgs{CONFIGURE_REQUIRES} +delete $MM_ARGS{MIN_PERL_VERSION} + if $eumm_version < 6.47_01; +$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} + if $eumm_version < 6.63_03; +$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} + if $eumm_version < 6.55_01; +delete $MM_ARGS{CONFIGURE_REQUIRES} if $eumm_version < 6.51_03; -WriteMakefile(%WriteMakefileArgs); +ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); +## END BOILERPLATE ########################################################### diff -Nru libimport-into-perl-1.002004/MANIFEST libimport-into-perl-1.002005/MANIFEST --- libimport-into-perl-1.002004/MANIFEST 2014-07-09 16:25:40.000000000 +0000 +++ libimport-into-perl-1.002005/MANIFEST 2015-08-28 00:29:57.000000000 +0000 @@ -1,7 +1,5 @@ Changes lib/Import/Into.pm -maint/bump-version -maint/Makefile.include maint/Makefile.PL.include Makefile.PL MANIFEST This list of files diff -Nru libimport-into-perl-1.002004/META.json libimport-into-perl-1.002005/META.json --- libimport-into-perl-1.002004/META.json 2014-07-09 16:25:39.000000000 +0000 +++ libimport-into-perl-1.002005/META.json 2015-08-28 00:29:56.000000000 +0000 @@ -4,7 +4,7 @@ "mst - Matt S. Trout (cpan:MSTROUT) " ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141520", + "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001", "license" : [ "perl_5" ], @@ -20,6 +20,12 @@ ] }, "prereqs" : { + "build" : {}, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, "runtime" : { "requires" : { "Module::Runtime" : "0", @@ -48,5 +54,5 @@ "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Import-Into.git" } }, - "version" : "1.002004" + "version" : "1.002005" } diff -Nru libimport-into-perl-1.002004/META.yml libimport-into-perl-1.002005/META.yml --- libimport-into-perl-1.002004/META.yml 2014-07-09 16:25:39.000000000 +0000 +++ libimport-into-perl-1.002005/META.yml 2015-08-28 00:29:56.000000000 +0000 @@ -6,8 +6,10 @@ Exporter: '0' Test::More: '0' base: '0' +configure_requires: + ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141520' +generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -25,4 +27,4 @@ resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Import-Into repository: git://git.shadowcat.co.uk/p5sagit/Import-Into.git -version: '1.002004' +version: '1.002005' diff -Nru libimport-into-perl-1.002004/t/import_into.t libimport-into-perl-1.002005/t/import_into.t --- libimport-into-perl-1.002004/t/import_into.t 2014-07-08 23:52:45.000000000 +0000 +++ libimport-into-perl-1.002005/t/import_into.t 2015-08-28 00:28:18.000000000 +0000 @@ -3,18 +3,35 @@ use Test::More qw(no_plan); BEGIN { - package MyExporter; + $INC{"MyExporter.pm"} = __FILE__; use base qw(Exporter); our @EXPORT_OK = qw(thing); sub thing { 'thing' } +} + +my @importcaller; +my @versioncaller; +my $version; +BEGIN { + package CheckFile; + $INC{"CheckFile.pm"} = __FILE__; - $INC{"MyExporter.pm"} = 1; + sub import { + @importcaller = caller; + } + sub VERSION { + $version = $_[1]; + @versioncaller = caller; + } +} +BEGIN { package MultiExporter; + $INC{"MultiExporter.pm"} = __FILE__; use Import::Into; @@ -23,30 +40,10 @@ warnings->import::into($target); MyExporter->import::into($target, 'thing'); CheckFile->import::into(1); - - } - - $INC{"MultiExporter.pm"} = 1; -} - -my @checkcaller; -my $checkversion; -BEGIN { - - package CheckFile; - - sub import { - @checkcaller = caller; } - sub VERSION { - $checkversion = $_[1]; - } - - $INC{"CheckFile.pm"} = 1; } eval q{ - package TestPackage; no warnings FATAL => 'all'; @@ -71,10 +68,17 @@ like($w[0], qr/uninitialized/, 'Correct warning'); -is $checkcaller[0], 'TestPackage', 'import by level has correct package'; -is $checkcaller[1], 'import_into_inline.pl', 'import by level has correct file'; -is $checkcaller[2], 1, 'import by level has correct line'; - +is $importcaller[0], 'TestPackage', + 'import by level has correct package'; +is $importcaller[1], 'import_into_inline.pl', + 'import by level has correct file'; +is $importcaller[2], 1, + 'import by level has correct line'; +is scalar @versioncaller, 0, 'VERSION not called when not specified'; + +@importcaller = (); +@versioncaller = (); +$version = undef; CheckFile->import::into({ package => 'ExplicitPackage', filename => 'explicit-file.pl', @@ -82,10 +86,58 @@ version => 219, }); -is $checkcaller[0], 'ExplicitPackage', 'import with hash has correct package'; -is $checkcaller[1], 'explicit-file.pl', 'import with hash has correct file'; -is $checkcaller[2], 42, 'import with hash has correct line'; -is $checkversion, 219, 'import with hash has correct version'; +is $importcaller[0], 'ExplicitPackage', + 'import with hash has correct package'; +is $importcaller[1], 'explicit-file.pl', + 'import with hash has correct file'; +is $importcaller[2], 42, + 'import with hash has correct line'; +is $versioncaller[0], 'ExplicitPackage', + 'VERSION with hash has correct package'; +is $versioncaller[1], 'explicit-file.pl', + 'VERSION with hash has correct file'; +is $versioncaller[2], 42, + 'VERSION with hash has correct line'; +is $version, 219, + 'import with hash has correct version'; + +BEGIN { + package LevelExporter; + $INC{'LevelExporter.pm'} = __FILE__; + + sub import { + CheckFile->import::into({ + level => 1, + version => 219, + }); + } +} + +@importcaller = (); +@versioncaller = (); +$version = undef; +eval q{ + package ExplicitLevel; + +#line 42 "explicit-level.pl" + use LevelExporter; + 1; +} or die $@; + +is $importcaller[0], 'ExplicitLevel', + 'import with level in hash has correct package'; +is $importcaller[1], 'explicit-level.pl', + 'import with level in hash has correct file'; +is $importcaller[2], 42, + 'import with level in hash has correct line'; +is $versioncaller[0], 'ExplicitLevel', + 'VERSION with level in hash has correct package'; +is $versioncaller[1], 'explicit-level.pl', + 'VERSION with level in hash has correct file'; +is $versioncaller[2], 42, + 'VERSION with level in hash has correct line'; +is $version, 219, + 'import with level in hash has correct version'; ok( !IPC::Open3->can("open3"), "IPC::Open3 is unloaded" ); IPC::Open3->import::into("TestPackage");