diff -Nru libclass-inspector-perl-1.31/Changes libclass-inspector-perl-1.32/Changes --- libclass-inspector-perl-1.31/Changes 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/Changes 2017-08-08 18:12:46.000000000 +0000 @@ -1,5 +1,11 @@ Revision history for Perl extension Class-Inspector +1.32 2017-08-08 14:12:42 -0400 + - The installed method now supports @INC hooks of any type + (coderef was supported as of 1.29, now arrayrefs and objects + are supported) + - Detect probably broken Perl on Cygwin in Makefile.PL (see gh#5) + 1.31 2016-11-25 09:33:47 -0500 - Migrated from Module::Install to Dist::Zilla and ExtUtils::MakeMaker - Fixed meta for repository which was pointing to the wrong URL diff -Nru libclass-inspector-perl-1.31/debian/changelog libclass-inspector-perl-1.32/debian/changelog --- libclass-inspector-perl-1.31/debian/changelog 2016-11-25 19:01:48.000000000 +0000 +++ libclass-inspector-perl-1.32/debian/changelog 2017-10-31 20:01:23.000000000 +0000 @@ -1,3 +1,14 @@ +libclass-inspector-perl (1.32-1) unstable; urgency=medium + + [ Alex Muntada ] + * Remove inactive pkg-perl members from Uploaders. + + [ Damyan Ivanov ] + * New upstream version 1.32 + * declare conformance with Policy 4.1.1 (no changes needed) + + -- Damyan Ivanov Tue, 31 Oct 2017 20:01:23 +0000 + libclass-inspector-perl (1.31-1) unstable; urgency=medium * Import upstream version 1.31. diff -Nru libclass-inspector-perl-1.31/debian/control libclass-inspector-perl-1.32/debian/control --- libclass-inspector-perl-1.31/debian/control 2016-11-25 19:01:48.000000000 +0000 +++ libclass-inspector-perl-1.32/debian/control 2017-10-31 20:01:10.000000000 +0000 @@ -1,7 +1,6 @@ Source: libclass-inspector-perl Maintainer: Debian Perl Group Uploaders: gregor herrmann , - Krzysztof Krzyzaniak (eloy) , Damyan Ivanov , Xavier Guimard Section: perl @@ -9,7 +8,7 @@ Priority: optional Build-Depends: debhelper (>= 9) Build-Depends-Indep: perl -Standards-Version: 3.9.8 +Standards-Version: 4.1.1 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libclass-inspector-perl.git Vcs-Git: https://anonscm.debian.org/git/pkg-perl/packages/libclass-inspector-perl.git Homepage: https://metacpan.org/release/Class-Inspector diff -Nru libclass-inspector-perl-1.31/dist.ini libclass-inspector-perl-1.32/dist.ini --- libclass-inspector-perl-1.31/dist.ini 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/dist.ini 2017-08-08 18:12:46.000000000 +0000 @@ -4,13 +4,25 @@ license = Perl_5 copyright_holder = Adam Kennedy copyright_year = 2016 -version = 1.31 +version = 1.32 [@Author::Plicease] -:version = 2.10 +:version = 2.21 travis_status = 1 release_tests = 1 +preamble = | { +preamble = | my $fn = 'Class/Inspector.pm'; +preamble = | unless(index('lib/Class/Inspector.pm', $fn) == index('lib/Class/Inspector.pm', 'Class/Inspector.pm')) +preamble = | { +preamble = | print "I believe you have a broken Perl.\n"; +preamble = | print "Please see https://github.com/plicease/Class-Inspector/issues/5\n"; +preamble = | print "If you believe this diagnostic is mistaken, you can edit the Makefile.PL and comment out the logic that determins this.\n"; +preamble = | print "If you believe this diagnostic is mistaken, feel free to comment on the issue above.\n"; +preamble = | exit; +preamble = | } +preamble = | } + [Prereqs / TestPrereqs] -phase = test ; TODO: this gets overridden with 0.94 @@ -35,6 +47,9 @@ original = Adam Kennedy contributor = Tom Wyant contributor = Steffen Müller +contributor = Kivanc Yazan (KYZN) + +[MetaProvides::Package] [PruneFiles] filename = xt/release/changes.t diff -Nru libclass-inspector-perl-1.31/lib/Class/Inspector/Functions.pm libclass-inspector-perl-1.32/lib/Class/Inspector/Functions.pm --- libclass-inspector-perl-1.31/lib/Class/Inspector/Functions.pm 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/lib/Class/Inspector/Functions.pm 2017-08-08 18:12:46.000000000 +0000 @@ -7,7 +7,7 @@ use Class::Inspector (); # ABSTRACT: Get information about a class and its structure -our $VERSION = '1.31'; # VERSION +our $VERSION = '1.32'; # VERSION BEGIN { our @ISA = 'Exporter'; @@ -58,7 +58,7 @@ =head1 VERSION -version 1.31 +version 1.32 =head1 SYNOPSIS @@ -125,6 +125,8 @@ Steffen Müller +Kivanc Yazan (KYZN) + =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2016 by Adam Kennedy. diff -Nru libclass-inspector-perl-1.31/lib/Class/Inspector.pm libclass-inspector-perl-1.32/lib/Class/Inspector.pm --- libclass-inspector-perl-1.31/lib/Class/Inspector.pm 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/lib/Class/Inspector.pm 2017-08-08 18:12:46.000000000 +0000 @@ -8,7 +8,7 @@ use File::Spec (); # ABSTRACT: Get information about a class and its structure -our $VERSION = '1.31'; # VERSION +our $VERSION = '1.32'; # VERSION # If Unicode is available, enable it so that the @@ -36,12 +36,25 @@ my $filename = $class->_inc_filename(shift) or return undef; foreach my $inc ( @INC ) { - if(ref $inc eq 'CODE') { + my $ref = ref $inc; + if($ref eq 'CODE') { my @ret = $inc->($inc, $filename); if(@ret) { return 1; } } + elsif($ref eq 'ARRAY' && ref($inc->[0]) eq 'CODE') { + my @ret = $inc->[0]->($inc, $filename); + if(@ret) { + return 1; + } + } + elsif($ref && eval { $inc->can('INC') }) { + my @ret = $inc->INC($filename); + if(@ret) { + return 1; + } + } } ''; @@ -391,7 +404,7 @@ =head1 VERSION -version 1.31 +version 1.32 =head1 SYNOPSIS @@ -631,6 +644,8 @@ Steffen Müller +Kivanc Yazan (KYZN) + =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2016 by Adam Kennedy. diff -Nru libclass-inspector-perl-1.31/Makefile.PL libclass-inspector-perl-1.32/Makefile.PL --- libclass-inspector-perl-1.31/Makefile.PL 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/Makefile.PL 2017-08-08 18:12:46.000000000 +0000 @@ -1,11 +1,22 @@ use strict; use warnings; BEGIN { + { + my $fn = 'Class/Inspector.pm'; + unless(index('lib/Class/Inspector.pm', $fn) == index('lib/Class/Inspector.pm', 'Class/Inspector.pm')) + { + print "I believe you have a broken Perl.\n"; + print "Please see https://github.com/plicease/Class-Inspector/issues/5\n"; + print "If you believe this diagnostic is mistaken, you can edit the Makefile.PL and comment out the logic that determins this.\n"; + print "If you believe this diagnostic is mistaken, feel free to comment on the issue above.\n"; + exit; + } + } unless(eval q{ use 5.006; 1}) { print "Perl 5.006 or better required\n"; exit; } } -# This file was automatically generated by Dist::Zilla::Plugin::Author::Plicease::MakeMaker v2.10. +# This file was automatically generated by Dist::Zilla::Plugin::Author::Plicease::MakeMaker v2.21. use strict; use warnings; @@ -33,7 +44,7 @@ "TEST_REQUIRES" => { "Test::More" => "0.94" }, - "VERSION" => "1.31", + "VERSION" => "1.32", "test" => { "TESTS" => "t/*.t" } diff -Nru libclass-inspector-perl-1.31/MANIFEST libclass-inspector-perl-1.32/MANIFEST --- libclass-inspector-perl-1.31/MANIFEST 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/MANIFEST 2017-08-08 18:12:46.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.008. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.010. Changes INSTALL LICENSE diff -Nru libclass-inspector-perl-1.31/META.json libclass-inspector-perl-1.32/META.json --- libclass-inspector-perl-1.31/META.json 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/META.json 2017-08-08 18:12:46.000000000 +0000 @@ -5,7 +5,7 @@ "Adam Kennedy " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -48,6 +48,16 @@ } } }, + "provides" : { + "Class::Inspector" : { + "file" : "lib/Class/Inspector.pm", + "version" : "1.32" + }, + "Class::Inspector::Functions" : { + "file" : "lib/Class/Inspector/Functions.pm", + "version" : "1.32" + } + }, "release_status" : "stable", "resources" : { "bugtracker" : { @@ -60,7 +70,14 @@ "web" : "https://github.com/plicease/Class-Inspector" } }, - "version" : "1.31", - "x_serialization_backend" : "Cpanel::JSON::XS version 3.0218" + "version" : "1.32", + "x_contributors" : [ + "Adam Kennedy ", + "Graham Ollis ", + "Tom Wyant", + "Steffen M\u00fcller", + "Kivanc Yazan (KYZN)" + ], + "x_serialization_backend" : "Cpanel::JSON::XS version 3.0237" } diff -Nru libclass-inspector-perl-1.31/META.yml libclass-inspector-perl-1.32/META.yml --- libclass-inspector-perl-1.31/META.yml 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/META.yml 2017-08-08 18:12:46.000000000 +0000 @@ -10,12 +10,19 @@ ExtUtils::MakeMaker: '0' perl: '5.006' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Class-Inspector +provides: + Class::Inspector: + file: lib/Class/Inspector.pm + version: '1.32' + Class::Inspector::Functions: + file: lib/Class/Inspector/Functions.pm + version: '1.32' requires: File::Spec: '0.80' perl: '5.006' @@ -23,5 +30,11 @@ bugtracker: https://github.com/plicease/Class-Inspector/issues homepage: https://metacpan.org/pod/Class::Inspector repository: git://github.com/plicease/Class-Inspector.git -version: '1.31' -x_serialization_backend: 'YAML::Tiny version 1.69' +version: '1.32' +x_contributors: + - 'Adam Kennedy ' + - 'Graham Ollis ' + - 'Tom Wyant' + - 'Steffen Müller' + - 'Kivanc Yazan (KYZN)' +x_serialization_backend: 'YAML::Tiny version 1.70' diff -Nru libclass-inspector-perl-1.31/README libclass-inspector-perl-1.32/README --- libclass-inspector-perl-1.31/README 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/README 2017-08-08 18:12:46.000000000 +0000 @@ -4,7 +4,7 @@ VERSION - version 1.31 + version 1.32 SYNOPSIS @@ -244,6 +244,8 @@ Steffen Müller + Kivanc Yazan (KYZN) + COPYRIGHT AND LICENSE This software is copyright (c) 2016 by Adam Kennedy. diff -Nru libclass-inspector-perl-1.31/t/04_main_functions.t libclass-inspector-perl-1.32/t/04_main_functions.t --- libclass-inspector-perl-1.31/t/04_main_functions.t 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/t/04_main_functions.t 2017-08-08 18:12:46.000000000 +0000 @@ -6,7 +6,7 @@ use strict; use warnings; -use Test::More tests => 22; +use Test::More tests => 24; use Class::Inspector::Functions; # To make maintaining this a little faster, @@ -74,7 +74,47 @@ return }; +unshift @INC, [ sub { + my $arrayref = shift; + my $filename = shift; + + die "args wrong" unless + ref($arrayref->[0]) eq 'CODE' + && $arrayref->[1] == 1 + && $arrayref->[2] == 2 + && $arrayref->[3] == 3; + + if($filename eq 'Foo/Baz.pm') { + open my $fh, '<', __FILE__; + return $fh; + } + return +}, 1,2,3]; + +unshift @INC, MyHook->new; + # Check the installed stuff ok( installed( CI ), "installed detects installed" ); ok( ! installed( BAD ), "installed detects not installed" ); ok( installed( 'Foo::Bar'), "installed detects coderef installed" ); +ok( installed( 'Foo::Baz'), "installed detects arrayref installed" ); +ok( installed( 'Foo::Foo'), "installed detects object installed" ); + +package + MyHook; + +sub new { + my($class) = @_; + bless {}, $class; +} + +sub MyHook::INC { + my($self, $filename) = @_; + die "self wrong" unless ref $self eq 'MyHook'; + + if($filename eq 'Foo/Foo.pm') { + open my $fh, '<', __FILE__; + return $fh; + } + return; +} diff -Nru libclass-inspector-perl-1.31/xt/author/strict.t libclass-inspector-perl-1.32/xt/author/strict.t --- libclass-inspector-perl-1.31/xt/author/strict.t 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/xt/author/strict.t 2017-08-08 18:12:46.000000000 +0000 @@ -12,8 +12,9 @@ chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); unshift @Test::Strict::MODULES_ENABLING_STRICT, - 'sips', + 'ozo', 'Test2::Bundle::SIPS', + 'Test2::V0', 'Test2::Bundle::Extended'; note "enabling strict = $_" for @Test::Strict::MODULES_ENABLING_STRICT; diff -Nru libclass-inspector-perl-1.31/xt/release/fixme.t libclass-inspector-perl-1.32/xt/release/fixme.t --- libclass-inspector-perl-1.31/xt/release/fixme.t 2016-11-25 14:33:51.000000000 +0000 +++ libclass-inspector-perl-1.32/xt/release/fixme.t 2017-08-08 18:12:46.000000000 +0000 @@ -13,7 +13,7 @@ run_tests( match => qr/FIXME/, - where => [ grep { -e $_ } qw( bin lib t Makefile.PL )], + where => [ grep { -e $_ } qw( bin lib t Makefile.PL Build.PL )], warn => 1, );