Hello community,

here is the log from the commit of package perl-namespace-clean for 
openSUSE:Factory checked in at 2016-05-25 21:29:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-namespace-clean (Old)
 and      /work/SRC/openSUSE:Factory/.perl-namespace-clean.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-namespace-clean"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-namespace-clean/perl-namespace-clean.changes    
    2015-10-19 22:49:49.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-namespace-clean.new/perl-namespace-clean.changes
   2016-05-25 21:29:10.000000000 +0200
@@ -1,0 +2,13 @@
+Mon May 23 13:10:12 UTC 2016 - [email protected]
+
+- updated to 0.27
+   see /usr/share/doc/packages/perl-namespace-clean/Changes
+
+  0.27  2016-05-18 02:24 (UTC)
+          - Allow packages to be cleaned multiple times
+          - Ensure the debugger workarounds are applied only when
+            DB::sub is actively used (they are superfluous otherwise)
+          - Work around P5#72210, resulting in fails on 5.8.8 -Duselongdouble
+          - Fix incorrect name in META (RT#107813)
+
+-------------------------------------------------------------------

Old:
----
  namespace-clean-0.26.tar.gz

New:
----
  namespace-clean-0.27.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-namespace-clean.spec ++++++
--- /var/tmp/diff_new_pack.T2GYRR/_old  2016-05-25 21:29:11.000000000 +0200
+++ /var/tmp/diff_new_pack.T2GYRR/_new  2016-05-25 21:29:11.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-namespace-clean
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           perl-namespace-clean
-Version:        0.26
+Version:        0.27
 Release:        0
 %define cpan_name namespace-clean
 Summary:        Keep imports and functions out of your namespace
@@ -31,9 +31,7 @@
 BuildRequires:  perl
 BuildRequires:  perl-macros
 BuildRequires:  perl(B::Hooks::EndOfScope) >= 0.12
-BuildRequires:  perl(ExtUtils::CBuilder) >= 0.27
 BuildRequires:  perl(Package::Stash) >= 0.23
-BuildRequires:  perl(Test::More) >= 0.88
 Requires:       perl(B::Hooks::EndOfScope) >= 0.12
 Requires:       perl(Package::Stash) >= 0.23
 %{perl_requires}

++++++ namespace-clean-0.26.tar.gz -> namespace-clean-0.27.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/Changes 
new/namespace-clean-0.27/Changes
--- old/namespace-clean-0.26/Changes    2015-10-07 19:43:07.000000000 +0200
+++ new/namespace-clean-0.27/Changes    2016-05-18 04:24:13.000000000 +0200
@@ -1,3 +1,10 @@
+0.27  2016-05-18 02:24 (UTC)
+        - Allow packages to be cleaned multiple times
+        - Ensure the debugger workarounds are applied only when
+          DB::sub is actively used (they are superfluous otherwise)
+        - Work around P5#72210, resulting in fails on 5.8.8 -Duselongdouble
+        - Fix incorrect name in META (RT#107813)
+
 0.26  2015-10-07 17:43 (UTC)
         - Exclusively use Package::Stash::PP on perls < 5.8.7 until a fixed
           Package::Stash::XS ships - breakage keeps getting reintroduced
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/MANIFEST 
new/namespace-clean-0.27/MANIFEST
--- old/namespace-clean-0.26/MANIFEST   2015-10-07 19:43:37.000000000 +0200
+++ new/namespace-clean-0.27/MANIFEST   2016-05-18 04:25:12.000000000 +0200
@@ -1,4 +1,5 @@
 Changes
+inc/ExtUtils/HasCompiler.pm
 lib/namespace/clean.pm
 lib/namespace/clean/_Util.pm
 Makefile.PL
@@ -12,13 +13,16 @@
 t/05-syntax-error.t
 t/06-other-types.t
 t/07-debugger.t
+t/07-pseudo-debugger.t
 t/08-const-sub.t
 t/09-fiddle-hinthash.t
 t/10-pure-perl.t
+t/11-multiclean-in-scope.t
 t/lib/CleaneeBridge.pm
 t/lib/CleaneeBridgeDirect.pm
 t/lib/CleaneeBridgeExplicit.pm
 t/lib/CleaneeTarget.pm
+t/lib/Devel/_NC_TEST_DashD.pm
 t/lib/ExporterTest.pm
 t/lib/FunctionWipeout.pm
 t/lib/Inheritance.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/META.json 
new/namespace-clean-0.27/META.json
--- old/namespace-clean-0.26/META.json  2015-10-07 19:43:37.000000000 +0200
+++ new/namespace-clean-0.27/META.json  2016-05-18 04:25:12.000000000 +0200
@@ -16,7 +16,7 @@
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
       "version" : "2"
    },
-   "name" : "namespace::clean",
+   "name" : "namespace-clean",
    "no_index" : {
       "directory" : [
          "t",
@@ -27,7 +27,6 @@
       "build" : {},
       "configure" : {
          "requires" : {
-            "ExtUtils::CBuilder" : "0.27",
             "ExtUtils::MakeMaker" : "0"
          }
       },
@@ -40,7 +39,7 @@
       },
       "test" : {
          "requires" : {
-            "Test::More" : "0.88"
+            "Test::More" : "0.47"
          }
       }
    },
@@ -54,10 +53,10 @@
       "repository" : {
          "type" : "git",
          "url" : "git://git.shadowcat.co.uk/p5sagit/namespace-clean.git",
-         "web" : 
"http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/namespace-clean.git";
+         "web" : "https://github.com/p5sagit/namespace-clean";
       },
       "x_IRC" : "irc://irc.perl.org/#toolchain"
    },
-   "version" : "0.26",
-   "x_serialization_backend" : "JSON::PP version 2.27203"
+   "version" : "0.27",
+   "x_serialization_backend" : "JSON::PP version 2.27300"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/META.yml 
new/namespace-clean-0.27/META.yml
--- old/namespace-clean-0.26/META.yml   2015-10-07 19:43:37.000000000 +0200
+++ new/namespace-clean-0.27/META.yml   2016-05-18 04:25:12.000000000 +0200
@@ -7,9 +7,8 @@
   - 'Peter Rabbitson <[email protected]>'
   - 'Father Chrysostomos <[email protected]>'
 build_requires:
-  Test::More: '0.88'
+  Test::More: '0.47'
 configure_requires:
-  ExtUtils::CBuilder: '0.27'
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
 generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 
2.150005'
@@ -17,7 +16,7 @@
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
   version: '1.4'
-name: namespace::clean
+name: namespace-clean
 no_index:
   directory:
     - t
@@ -31,5 +30,5 @@
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=namespace-clean
   homepage: http://search.cpan.org/dist/namespace-clean
   repository: git://git.shadowcat.co.uk/p5sagit/namespace-clean.git
-version: '0.26'
-x_serialization_backend: 'CPAN::Meta::YAML version 0.016'
+version: '0.27'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/Makefile.PL 
new/namespace-clean-0.27/Makefile.PL
--- old/namespace-clean-0.26/Makefile.PL        2015-10-01 05:54:37.000000000 
+0200
+++ new/namespace-clean-0.27/Makefile.PL        2016-05-17 16:44:27.000000000 
+0200
@@ -3,7 +3,7 @@
 use 5.008001;
 
 my %META = (
-  name => 'namespace::clean',
+  name => 'namespace-clean',
   license => 'perl_5',
 
   abstract => 'Keep imports and functions out of your namespace',
@@ -19,7 +19,6 @@
     configure => {
       requires => {
         'ExtUtils::MakeMaker'   => 0,
-        'ExtUtils::CBuilder'    => 0.27,
       }
     },
     runtime => {
@@ -31,7 +30,7 @@
     },
     test => {
       requires => {
-        'Test::More' => '0.88',
+        'Test::More' => '0.47',
       }
     },
   },
@@ -42,7 +41,7 @@
     repository => {
       type => 'git',
       url => 'git://git.shadowcat.co.uk/p5sagit/namespace-clean.git',
-      web => 
'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/namespace-clean.git',
+      web => 'https://github.com/p5sagit/namespace-clean',
     },
     bugtracker => {
       mailto => '[email protected]',
@@ -53,19 +52,97 @@
 
 my %MM_ARGS = ( (
   # a sub-namer is needed if using the debugger on some perls
-  require 'lib/namespace/clean/_Util.pm'
+  do {
+    # sigh... so much unmitigated stupidity on #p5p these days...
+    local @INC = ('lib', @INC);
+    require namespace::clean::_Util;
+  }
     and
   namespace::clean::_Util::DEBUGGER_NEEDS_CV_RENAME()
     and
   namespace::clean::_Util::_namer_load_error()
     and
-  can_xs()
+  usable_compiler_present()
 )
   # when changing version, also change $sn_ver in namespace/clean/_Util.pm
   ? ( PREREQ_PM => { 'Sub::Name' => '0.04' } )
   : ()
 );
 
+## XS-checking BOILERPLATE ###################################################
+sub usable_compiler_present {
+  return 0 if parse_args()->{PUREPERL_ONLY};
+
+  my $ucp;
+
+  local $@;
+  eval {
+    # poor man's inc::latest
+    my $euhc_fn = 'ExtUtils/HasCompiler.pm';
+    my $euhc_found_in_INC_dir;
+
+    ( ($euhc_found_in_INC_dir) = grep {
+      not length ref $_
+        and
+      -f "$_/$euhc_fn"
+        and
+      -r "$_/$euhc_fn"
+    } @INC )
+      and
+    (
+      MM->parse_version("$euhc_found_in_INC_dir/$euhc_fn")
+        >
+      MM->parse_version("inc/$euhc_fn")
+    )
+      and
+    eval { require ExtUtils::HasCompiler };
+
+    unless ( $INC{'ExtUtils/HasCompiler.pm'} ) {
+      local @INC = ( "inc", @INC );
+      require ExtUtils::HasCompiler;
+    }
+
+    $ucp = ExtUtils::HasCompiler::can_compile_loadable_object(quiet => 1)
+      ? 1
+      : 0
+    ;
+
+    1;
+  };
+
+  if( my $used_fn = $INC{'ExtUtils/HasCompiler.pm'} ) {
+    printf
+      "ExtUtils::HasCompiler::can_compile_loadable_object() v%s (loaded from 
%s) returned: %s\n",
+      ExtUtils::HasCompiler->VERSION,
+      $used_fn,
+      ( defined($ucp) ? $ucp : "UNKNOWN" ),
+    ;
+  }
+  else {
+    print "Something went wrong when trying to load/use 
ExtUtils::HasCompiler:\n$@\n\n";
+  }
+
+  $ucp;
+}
+
+
+# FIXME - this has been cargo-culted from
+# https://metacpan.org/source/HAARG/strictures-2.000002/Makefile.PL
+# There likely will be better ways to handle %ENV and @ARGV directly within
+# EU::HC in the future
+sub parse_args {
+  # copied from EUMM
+  require ExtUtils::MakeMaker;
+  require Text::ParseWords;
+  ExtUtils::MakeMaker::parse_args(
+    my $tmp = {},
+    Text::ParseWords::shellwords($ENV{PERL_MM_OPT} || ''),
+    @ARGV,
+  );
+  return $tmp->{ARGS} || {};
+}
+## END XS-checking BOILERPLATE ###############################################
+
 
 ## BOILERPLATE ###############################################################
 require ExtUtils::MakeMaker;
@@ -108,106 +185,3 @@
 
 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
 ## END BOILERPLATE ###########################################################
-
-
-# FIXME
-# Need to replace with EU::HC, but too many changes for this release already
-###########################################
-# can we locate a (the) C compiler
-sub can_cc {
-  my @chunks = split(/ /, $Config::Config{cc}) or return;
-
-  # $Config{cc} may contain args; try to find out the program part
-  while (@chunks) {
-    return can_run("@chunks") || (pop(@chunks), next);
-  }
-
-  return;
-}
-
-# check if we can run some command
-sub can_run {
-  my ($cmd) = @_;
-
-  return $cmd if -x $cmd;
-  if (my $found_cmd = MM->maybe_command($cmd)) {
-    return $found_cmd;
-  }
-
-  require File::Spec;
-  for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
-    next if $dir eq '';
-    my $abs = File::Spec->catfile($dir, $cmd);
-    return $abs if (-x $abs or $abs = MM->maybe_command($abs));
-  }
-
-  return;
-}
-
-# Can our C compiler environment build XS files
-sub can_xs {
-  # Do we have the configure_requires checker?
-  local $@;
-  eval "require ExtUtils::CBuilder; ExtUtils::CBuilder->VERSION(0.27)";
-  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 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;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/inc/ExtUtils/HasCompiler.pm 
new/namespace-clean-0.27/inc/ExtUtils/HasCompiler.pm
--- old/namespace-clean-0.26/inc/ExtUtils/HasCompiler.pm        1970-01-01 
01:00:00.000000000 +0100
+++ new/namespace-clean-0.27/inc/ExtUtils/HasCompiler.pm        2016-05-17 
12:40:33.000000000 +0200
@@ -0,0 +1,160 @@
+package ExtUtils::HasCompiler;
+$ExtUtils::HasCompiler::VERSION = '0.014';
+use strict;
+use warnings;
+
+use base 'Exporter';
+our @EXPORT_OK = qw/can_compile_loadable_object/;
+our %EXPORT_TAGS = (all => \@EXPORT_OK);
+
+use Config;
+use Carp 'carp';
+use File::Basename 'basename';
+use File::Spec::Functions qw/catfile catdir rel2abs/;
+use File::Temp qw/tempdir tempfile/;
+
+my $tempdir = tempdir('HASCOMPILERXXXX', CLEANUP => 1, DIR => '.');
+
+my $loadable_object_format = <<'END';
+#define PERL_NO_GET_CONTEXT
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#ifndef PERL_UNUSED_VAR
+#define PERL_UNUSED_VAR(var)
+#endif
+
+XS(exported) {
+#ifdef dVAR
+       dVAR;
+#endif
+       dXSARGS;
+
+       PERL_UNUSED_VAR(cv); /* -W */
+       PERL_UNUSED_VAR(items); /* -W */
+
+       XSRETURN_IV(42);
+}
+
+#ifndef XS_EXTERNAL
+#define XS_EXTERNAL(foo) XS(foo)
+#endif
+
+/* we don't want to mess with .def files on mingw */
+#if defined(WIN32) && defined(__GNUC__)
+#  define EXPORT __declspec(dllexport)
+#else
+#  define EXPORT
+#endif
+
+EXPORT XS_EXTERNAL(boot_%s) {
+#ifdef dVAR
+       dVAR;
+#endif
+       dXSARGS;
+
+       PERL_UNUSED_VAR(cv); /* -W */
+       PERL_UNUSED_VAR(items); /* -W */
+
+       newXS("%s::exported", exported, __FILE__);
+}
+
+END
+
+my $counter = 1;
+my %prelinking = map { $_ => 1 } qw/MSWin32 VMS aix/;
+
+sub can_compile_loadable_object {
+       my %args = @_;
+
+       my $output = $args{output} || \*STDOUT;
+
+       my $config = $args{config} || 'ExtUtils::HasCompiler::Config';
+       return if not $config->get('usedl');
+
+       my ($source_handle, $source_name) = tempfile('TESTXXXX', DIR => 
$tempdir, SUFFIX => '.c', UNLINK => 1);
+       my $basename = basename($source_name, '.c');
+
+       my $shortname = '_Loadable' . $counter++;
+       my $package = "ExtUtils::HasCompiler::$shortname";
+       printf $source_handle $loadable_object_format, $basename, $package or 
do { carp "Couldn't write to $source_name: $!"; return };
+       close $source_handle or do { carp "Couldn't close $source_name: $!"; 
return };
+
+       my $abs_basename = catfile($tempdir, $basename);
+       my $object_file = $abs_basename . $config->get('_o');
+       my $loadable_object = $abs_basename . '.' . $config->get('dlext');
+       my $incdir = catdir($config->get('archlibexp'), 'CORE');
+
+       my ($cc, $ccflags, $optimize, $cccdlflags, $ld, $ldflags, $lddlflags, 
$libperl, $perllibs) = map { $config->get($_) } qw/cc ccflags optimize 
cccdlflags ld ldflags lddlflags libperl perllibs/;
+
+       if ($prelinking{$^O}) {
+               require ExtUtils::Mksymlists;
+               ExtUtils::Mksymlists::Mksymlists(NAME => $basename, FILE => 
$abs_basename, IMPORTS => {});
+       }
+       my @commands;
+       if ($^O eq 'MSWin32' && $cc =~ /^cl/) {
+               push @commands, qq{$cc $ccflags $cccdlflags $optimize /I 
"$incdir" /c $source_name /Fo$object_file};
+               push @commands, qq{$ld $object_file $lddlflags $libperl 
$perllibs /out:$loadable_object /def:$abs_basename.def /pdb:$abs_basename.pdb};
+       }
+       elsif ($^O eq 'VMS') {
+               # Mksymlists is only the beginning of the story.
+               open my $opt_fh, '>>', "$abs_basename.opt" or do { carp 
"Couldn't append to '$abs_basename.opt'"; return };
+               print $opt_fh "PerlShr/Share\n";
+               close $opt_fh;
+
+               my $incdirs = $ccflags =~ s{ /inc[^=]+ (?:=)+ (?:\()? ( 
[^\/\)]* ) }{}xi ? "$1,$incdir" : $incdir;
+               push @commands, qq{$cc $ccflags $optimize /include=($incdirs) 
$cccdlflags $source_name /obj=$object_file};
+               push @commands, qq{$ld $ldflags $lddlflags=$loadable_object 
$object_file,$abs_basename.opt/OPTIONS,${incdir}perlshr_attr.opt/OPTIONS' 
$perllibs};
+       }
+       else {
+               my @extra;
+               if ($^O eq 'MSWin32') {
+                       my $lib = '-l' . ($libperl =~ /lib([^.]+)\./)[0];
+                       push @extra, "$abs_basename.def", $lib, $perllibs;
+               }
+               elsif ($^O eq 'cygwin') {
+                       push @extra, catfile($incdir, 
$config->get('useshrplib') ? 'libperl.dll.a' : 'libperl.a');
+               }
+               elsif ($^O eq 'aix') {
+                       $lddlflags =~ s/\Q$(BASEEXT)\E/$abs_basename/;
+                       $lddlflags =~ s/\Q$(PERL_INC)\E/$incdir/;
+               }
+               elsif ($^O eq 'android') {
+                       push @extra, qq{"-L$incdir"}, '-lperl', $perllibs;
+               }
+               push @commands, qq{$cc $ccflags $optimize "-I$incdir" 
$cccdlflags -c $source_name -o $object_file};
+               push @commands, qq{$cc $optimize $object_file -o 
$loadable_object $lddlflags @extra};
+       }
+
+       for my $command (@commands) {
+               print $output "$command\n" if not $args{quiet};
+               system $command and do { carp "Couldn't execute $command: $!"; 
return };
+       }
+
+       # Skip loading when cross-compiling
+       return 1 if exists $args{skip_load} ? $args{skip_load} : 
$config->get('usecrosscompile');
+
+       require DynaLoader;
+       local @DynaLoader::dl_require_symbols = "boot_$basename";
+       my $handle = DynaLoader::dl_load_file(rel2abs($loadable_object), 0);
+       if ($handle) {
+               my $symbol = DynaLoader::dl_find_symbol($handle, 
"boot_$basename") or do { carp "Couldn't find boot symbol for $basename"; 
return };
+               my $compilet = 
DynaLoader::dl_install_xsub('__ANON__::__ANON__', $symbol, $source_name);
+               my $ret = eval { $compilet->(); $package->exported } or carp $@;
+               delete $ExtUtils::HasCompiler::{"$shortname\::"};
+               eval { DynaLoader::dl_unload_file($handle) } or carp $@;
+               return defined $ret && $ret == 42;
+       }
+       else {
+               carp "Couldn't load $loadable_object: " . 
DynaLoader::dl_error();
+               return;
+       }
+}
+
+sub ExtUtils::HasCompiler::Config::get {
+       my (undef, $key) = @_;
+       return $ENV{uc $key} || $Config{$key};
+}
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/lib/namespace/clean/_Util.pm 
new/namespace-clean-0.27/lib/namespace/clean/_Util.pm
--- old/namespace-clean-0.26/lib/namespace/clean/_Util.pm       2015-10-07 
08:59:58.000000000 +0200
+++ new/namespace-clean-0.27/lib/namespace/clean/_Util.pm       2016-04-10 
05:21:21.000000000 +0200
@@ -15,8 +15,8 @@
 use base 'Exporter';
 our @EXPORT_OK = qw( DEBUGGER_NEEDS_CV_RENAME DEBUGGER_NEEDS_CV_PIVOT );
 
-use constant DEBUGGER_NEEDS_CV_RENAME => ( ( $] > 5.008_008 ) and ( $] < 
5.013_006 ) );
-use constant DEBUGGER_NEEDS_CV_PIVOT => ( ( ! DEBUGGER_NEEDS_CV_RENAME ) and ( 
$] < 5.015_005 ) );
+use constant DEBUGGER_NEEDS_CV_RENAME => ( ( "$]" > 5.008_008 ) and ( "$]" < 
5.013_006 ) );
+use constant DEBUGGER_NEEDS_CV_PIVOT => ( ( ! DEBUGGER_NEEDS_CV_RENAME ) and ( 
"$]" < 5.015_005 ) );
 
 # FIXME - ideally this needs to be provided by some abstraction lib
 # but we don't have that yet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/lib/namespace/clean.pm 
new/namespace-clean-0.27/lib/namespace/clean.pm
--- old/namespace-clean-0.26/lib/namespace/clean.pm     2015-10-07 
19:43:20.000000000 +0200
+++ new/namespace-clean-0.27/lib/namespace/clean.pm     2016-05-18 
04:24:39.000000000 +0200
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 
-our $VERSION = '0.26';
+our $VERSION = '0.27';
 $VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev 
releases
 
 our $STORAGE_VAR = '__NAMESPACE_CLEAN_STORAGE';
@@ -16,7 +16,7 @@
 BEGIN {
   my $provider;
 
-  if ( $] < 5.008007 ) {
+  if ( "$]" < 5.008007 ) {
     require Package::Stash::PP;
     $provider = 'Package::Stash::PP';
   }
@@ -50,6 +50,13 @@
 # assumes the name of the glob passed to entersub can be used to find the CV
 # Workaround: realias the original glob to the deleted-stash slot
 #
+# While the errors manifest themselves inside perl5db.pl, they are caused by
+# problems inside the interpreter.  If enabled ($^P & 0x01) and existent,
+# the DB::sub sub will be called by the interpreter for any sub call rather
+# that call the sub directly.  It is provided the real sub to call in $DB::sub,
+# but the value given has the issues described above.  We only have to enable
+# the workaround if DB::sub will be used.
+#
 # Can not tie constants to the current value of $^P directly,
 # as the debugger can be enabled during runtime (kinda dubious)
 #
@@ -72,7 +79,9 @@
         my $need_debugger_fixup =
           ( DEBUGGER_NEEDS_CV_RENAME or DEBUGGER_NEEDS_CV_PIVOT )
             &&
-          $^P
+          $^P & 0x01
+            &&
+          defined &DB::sub
             &&
           ref(my $globref = \$cleanee_stash->namespace->{$f}) eq 'GLOB'
             &&
@@ -171,13 +180,9 @@
             $store->{remove}{ $f } = 1;
         }
 
-        # register EOF handler on first call to import
-        unless ($store->{handler_is_installed}) {
-            on_scope_end {
-                $RemoveSubs->($cleanee, $store, keys %{ $store->{remove} });
-            };
-            $store->{handler_is_installed} = 1;
-        }
+        on_scope_end {
+            $RemoveSubs->($cleanee, $store, keys %{ $store->{remove} });
+        };
 
         return 1;
     }
@@ -304,10 +309,10 @@
 
 You need to work around this by forcing a compile-time resolution like so:
 
- use MyApp::Utils 'sorter';
+ use MyApp::Utils 'my_sorter';
  use namespace::clean;
 
- my $my_sorter_cref = \&sorter;
+ my $my_sorter_cref = \&my_sorter;
 
  my @sorted = sort $my_sorter_cref @list;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/00-basic.t 
new/namespace-clean-0.27/t/00-basic.t
--- old/namespace-clean-0.26/t/00-basic.t       2013-07-10 04:19:30.000000000 
+0200
+++ new/namespace-clean-0.27/t/00-basic.t       2016-04-10 05:21:21.000000000 
+0200
@@ -1,9 +1,7 @@
-#!/usr/bin/env perl
 use warnings;
 use strict;
 
-use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib 't/lib';
 use Test::More tests => 4;
 
 use ExporterTest qw( foo bar );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/01-function-wipeout.t 
new/namespace-clean-0.27/t/01-function-wipeout.t
--- old/namespace-clean-0.26/t/01-function-wipeout.t    2014-03-05 
12:18:59.000000000 +0100
+++ new/namespace-clean-0.27/t/01-function-wipeout.t    2016-05-17 
12:28:10.000000000 +0200
@@ -1,9 +1,7 @@
-#!/usr/bin/env perl
 use warnings;
 use strict;
 
-use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib 't/lib';
 use Test::More tests => 9;
 
 use_ok('FunctionWipeout');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/02-inheritance.t 
new/namespace-clean-0.27/t/02-inheritance.t
--- old/namespace-clean-0.26/t/02-inheritance.t 2013-07-10 04:19:30.000000000 
+0200
+++ new/namespace-clean-0.27/t/02-inheritance.t 2016-04-10 05:21:21.000000000 
+0200
@@ -1,9 +1,7 @@
-#!/usr/bin/env perl
 use warnings;
 use strict;
 
-use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib 't/lib';
 use Test::More tests => 10;
 
 use_ok('Inheritance');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/03-unimport.t 
new/namespace-clean-0.27/t/03-unimport.t
--- old/namespace-clean-0.26/t/03-unimport.t    2013-07-10 04:19:30.000000000 
+0200
+++ new/namespace-clean-0.27/t/03-unimport.t    2016-04-10 05:21:21.000000000 
+0200
@@ -1,9 +1,7 @@
-#!/usr/bin/env perl
 use warnings;
 use strict;
 
-use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib 't/lib';
 use Test::More tests => 6;
 
 use_ok('Unimport');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/04-except.t 
new/namespace-clean-0.27/t/04-except.t
--- old/namespace-clean-0.26/t/04-except.t      2013-07-10 04:19:30.000000000 
+0200
+++ new/namespace-clean-0.27/t/04-except.t      2016-04-10 05:21:21.000000000 
+0200
@@ -1,9 +1,7 @@
-#!/usr/bin/env perl
 use warnings;
 use strict;
 
-use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib 't/lib';
 use Test::More tests => 6;
 
 {   package ExceptWithArray;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/05-explicit-cleanee.t 
new/namespace-clean-0.27/t/05-explicit-cleanee.t
--- old/namespace-clean-0.26/t/05-explicit-cleanee.t    2013-07-10 
04:19:30.000000000 +0200
+++ new/namespace-clean-0.27/t/05-explicit-cleanee.t    2016-04-10 
10:55:54.000000000 +0200
@@ -1,9 +1,7 @@
-#!/usr/bin/env perl
 use warnings;
 use strict;
 
-use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib 't/lib';
 use Test::More tests => 2019;
 
 use_ok('CleaneeTarget');
@@ -26,12 +24,7 @@
 
 
 # some torture
-SKIP: {
-
-  skip "This part of the test segfaults perl $] with both tie() and B::H::EOS."
-    . ' Actual code (e.g. DBIx::Class) works fine so did not investigate 
further',
-    2000 if $] < 5.008003;
-
+{
   local @INC = @INC;
   my @code;
   unshift @INC, sub {
@@ -57,7 +50,7 @@
   for (1..1000) {
     my $pkg = "CleaneeTarget::No${_}";
 
-    my @val = require "CleaneeTarget/No${_}.pm";
+    require "CleaneeTarget/No${_}.pm";
 
     ok !$pkg->can('x_foo'),    'explicitely removed disappeared';
     ok  $pkg->can('x_bar'),    'not in explicit removal and still there';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/05-syntax-error.t 
new/namespace-clean-0.27/t/05-syntax-error.t
--- old/namespace-clean-0.26/t/05-syntax-error.t        2013-07-10 
04:19:30.000000000 +0200
+++ new/namespace-clean-0.27/t/05-syntax-error.t        2016-04-10 
05:21:21.000000000 +0200
@@ -1,9 +1,7 @@
-#!/usr/bin/env perl
 use warnings;
 use strict;
 
-use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib 't/lib';
 use Test::More tests => 1;
 
 eval { require "SyntaxError.pm" };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/06-other-types.t 
new/namespace-clean-0.27/t/06-other-types.t
--- old/namespace-clean-0.26/t/06-other-types.t 2013-07-10 04:19:30.000000000 
+0200
+++ new/namespace-clean-0.27/t/06-other-types.t 2016-04-10 05:21:21.000000000 
+0200
@@ -1,9 +1,7 @@
-#!/usr/bin/env perl
 use warnings;
 use strict;
 
-use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib 't/lib';
 use Test::More tests => 17;
 
 our $pvio;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/07-debugger.t 
new/namespace-clean-0.27/t/07-debugger.t
--- old/namespace-clean-0.26/t/07-debugger.t    2015-10-07 08:03:43.000000000 
+0200
+++ new/namespace-clean-0.27/t/07-debugger.t    2016-04-10 05:21:21.000000000 
+0200
@@ -9,6 +9,9 @@
   ) {
     plan skip_all => $missing_xs;
   }
+  else {
+    plan tests => 4;
+  }
 }
 
 BEGIN {
@@ -20,7 +23,7 @@
 
 #line 1
 #!/usr/bin/perl -d
-#line 10
+#line 27
 
 }
 
@@ -42,5 +45,3 @@
 ok( !Foo->can("baz"), "baz cleaned up" );
 
 Foo->bar();
-
-done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/07-pseudo-debugger.t 
new/namespace-clean-0.27/t/07-pseudo-debugger.t
--- old/namespace-clean-0.26/t/07-pseudo-debugger.t     1970-01-01 
01:00:00.000000000 +0100
+++ new/namespace-clean-0.27/t/07-pseudo-debugger.t     2016-04-10 
05:21:21.000000000 +0200
@@ -0,0 +1,32 @@
+use warnings;
+use strict;
+
+use Test::More tests => 4;
+use lib 't/lib';
+
+BEGIN {
+
+#line 1
+#!/usr/bin/perl -d:_NC_TEST_DashD
+#line 12
+
+}
+
+{
+    package Foo;
+
+    BEGIN { *baz = sub { 42 } }
+    sub foo { 22 }
+
+    use namespace::clean;
+
+    sub bar {
+        ::is(baz(), 42);
+        ::is(foo(), 22);
+    }
+}
+
+ok( !Foo->can("foo"), "foo cleaned up" );
+ok( !Foo->can("baz"), "baz cleaned up" );
+
+Foo->bar();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/08-const-sub.t 
new/namespace-clean-0.27/t/08-const-sub.t
--- old/namespace-clean-0.26/t/08-const-sub.t   2013-07-10 04:19:30.000000000 
+0200
+++ new/namespace-clean-0.27/t/08-const-sub.t   2016-04-10 05:21:21.000000000 
+0200
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-use Test::More 0.88;
+use Test::More tests => 2;
 
 use constant CONST => 123;
 use namespace::clean;
@@ -10,5 +10,3 @@
 is $x, 123;
 
 ok eval("!defined(&CONST)");
-
-done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/09-fiddle-hinthash.t 
new/namespace-clean-0.27/t/09-fiddle-hinthash.t
--- old/namespace-clean-0.26/t/09-fiddle-hinthash.t     2013-07-10 
04:19:30.000000000 +0200
+++ new/namespace-clean-0.27/t/09-fiddle-hinthash.t     2016-04-10 
05:21:21.000000000 +0200
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-use Test::More 0.88;
+use Test::More tests => 4;
 
 {
   package Bar;
@@ -42,12 +42,9 @@
         'Tied hinthash values not present in extended caller() on perls older 
than 5.10'
        .', regardless of mode (PP or XS)',
         1
-      ) if ($] < 5.010_000);
+      ) if ("$]" < 5.010_000);
       package DB;
       Test::More::is( ( (caller(0))[10] || {} )->{foo}, 'bar', 'hinthash 
values visible in caller' );
     }
   }
 }
-
-
-done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/10-pure-perl.t 
new/namespace-clean-0.27/t/10-pure-perl.t
--- old/namespace-clean-0.26/t/10-pure-perl.t   2015-10-01 05:54:37.000000000 
+0200
+++ new/namespace-clean-0.27/t/10-pure-perl.t   2016-04-10 05:38:56.000000000 
+0200
@@ -17,6 +17,7 @@
 
   $ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION} = 'PP';
   $ENV{PACKAGE_STASH_IMPLEMENTATION} = 'PP';
+  plan tests => 15;
 }
 
 use B::Hooks::EndOfScope 0.12;
@@ -39,21 +40,23 @@
 ;
 
 use Config;
-use FindBin qw($Bin);
 use IPC::Open2 qw(open2);
 use File::Glob 'bsd_glob';
+use Cwd 'abs_path';
 
 # for the $^X-es
 $ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
+$ENV{PATH} = '';
 
 
 # rerun the tests under the assumption of pure-perl
-my $this_file = quotemeta(__FILE__);
+my $this_file = abs_path(__FILE__);
 
-for my $fn (bsd_glob("$Bin/*.t")) {
-  next if $fn =~ /${this_file}$/;
+for my $fn ( bsd_glob("t/*.t") ) {
 
-  my @cmd = ($^X, $fn);
+  next if abs_path($fn) eq $this_file;
+
+  my @cmd = map { $_ =~ /(.+)/ } ($^X, $fn);
 
   # this is cheating, and may even hang here and there (testing on windows 
passed fine)
   # if it does - will have to fix it somehow (really *REALLY* don't want to 
pull
@@ -67,5 +70,3 @@
   wait;
   ok (! $?, "Exit $? from: @cmd");
 }
-
-done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/11-multiclean-in-scope.t 
new/namespace-clean-0.27/t/11-multiclean-in-scope.t
--- old/namespace-clean-0.26/t/11-multiclean-in-scope.t 1970-01-01 
01:00:00.000000000 +0100
+++ new/namespace-clean-0.27/t/11-multiclean-in-scope.t 2016-04-10 
05:38:56.000000000 +0200
@@ -0,0 +1,78 @@
+use strict;
+use warnings;
+
+use Test::More tests => 13;
+
+eval q{
+  package Class1;
+  sub cleaned1 {}
+  use namespace::clean;
+  1;
+} or die $@;
+
+ok !Class1->can('cleaned1'), 'basic clean';
+
+eval q{
+  package Class1;
+  sub cleaned2 {}
+  use namespace::clean;
+  1;
+} or die $@;
+
+ok !Class1->can('cleaned2'), 'clean same class again';
+
+eval q{
+  package Class2;
+  sub cleaned1 {}
+  use namespace::clean;
+  sub left1 {}
+  no namespace::clean;
+  sub cleaned2 {}
+  use namespace::clean;
+  1;
+} or die $@;
+
+ok !Class2->can('cleaned1'), 'basic clean before no';
+ok +Class2->can('left1'),    'basic no clean';
+ok !Class2->can('cleaned2'), 'basic clean after no';
+
+eval q{
+  package Class2;
+  sub cleaned3 {}
+  use namespace::clean;
+  sub left2 {}
+  no namespace::clean;
+  sub cleaned4 {}
+  use namespace::clean;
+  1;
+} or die $@;
+
+ok !Class2->can('cleaned3'),  'clean again before no';
+ok +Class2->can('left2'),     'clean again no clean';
+ok !Class2->can('cleaned4'),  'clean again after no';
+
+eval q{
+  package Class3;
+  sub cleaned1 {}
+  use namespace::clean;
+  sub cleaned2 {}
+  no namespace::clean;
+  {
+    sub cleaned3 {}
+    use namespace::clean;
+  }
+  BEGIN {
+    package main;
+    ok !Class3->can('cleaned3'), 'clean inner scope';
+    {
+      local $TODO = 'unable to differentiate scopes';
+      ok +Class3->can('cleaned1'), 'clean inner scope leaves outer';
+    }
+    ok +Class3->can('cleaned2'), 'clean inner scope leaves outer no';
+  }
+  use namespace::clean;
+  1;
+} or die $@;
+
+ok !Class3->can('cleaned1'), 'clean after scoped';
+ok +Class3->can('cleaned2'), 'no clean after scoped';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/namespace-clean-0.26/t/lib/Devel/_NC_TEST_DashD.pm 
new/namespace-clean-0.27/t/lib/Devel/_NC_TEST_DashD.pm
--- old/namespace-clean-0.26/t/lib/Devel/_NC_TEST_DashD.pm      1970-01-01 
01:00:00.000000000 +0100
+++ new/namespace-clean-0.27/t/lib/Devel/_NC_TEST_DashD.pm      2016-04-10 
05:21:21.000000000 +0200
@@ -0,0 +1,9 @@
+package Devel::_NC_TEST_DashD;
+
+use warnings;
+use strict;
+
+sub DB::DB { 1 }
+
+1;
+


Reply via email to