Hello community,

here is the log from the commit of package perl-Devel-GlobalDestruction for 
openSUSE:Factory checked in at 2013-12-06 13:45:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Devel-GlobalDestruction (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Devel-GlobalDestruction.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Devel-GlobalDestruction"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Devel-GlobalDestruction/perl-Devel-GlobalDestruction.changes
        2013-06-09 16:55:47.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Devel-GlobalDestruction.new/perl-Devel-GlobalDestruction.changes
   2013-12-06 14:42:51.000000000 +0100
@@ -1,0 +2,9 @@
+Mon Nov 25 07:39:35 UTC 2013 - [email protected]
+
+- updated to 0.12
+ * Fix detection when loaded during global destruction by checking B::main_cv
+   instead of B::main_start
+ * Bump Sub::Exporter::Progressive dependency to fix loading in global
+   destruction
+
+-------------------------------------------------------------------

Old:
----
  Devel-GlobalDestruction-0.11.tar.gz

New:
----
  Devel-GlobalDestruction-0.12.tar.gz

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

Other differences:
------------------
++++++ perl-Devel-GlobalDestruction.spec ++++++
--- /var/tmp/diff_new_pack.wl1sCj/_old  2013-12-06 14:42:51.000000000 +0100
+++ /var/tmp/diff_new_pack.wl1sCj/_new  2013-12-06 14:42:51.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Devel-GlobalDestruction
-Version:        0.11
+Version:        0.12
 Release:        0
 %define cpan_name Devel-GlobalDestruction
 Summary:        Provides function returning the equivalent of
@@ -30,10 +30,10 @@
 BuildRequires:  perl
 BuildRequires:  perl-macros
 BuildRequires:  perl(ExtUtils::CBuilder) >= 0.27
-BuildRequires:  perl(Sub::Exporter::Progressive) >= 0.001006
+BuildRequires:  perl(Sub::Exporter::Progressive) >= 0.001011
 #BuildRequires: perl(Devel::GlobalDestruction)
 #BuildRequires: perl(Devel::GlobalDestruction::XS)
-Requires:       perl(Sub::Exporter::Progressive) >= 0.001006
+Requires:       perl(Sub::Exporter::Progressive) >= 0.001011
 %{perl_requires}
 
 %description
@@ -41,7 +41,7 @@
 because it's not ordered and objects can sometimes disappear.
 
 Writing defensive destructors is hard and annoying, and usually if global
-destruction is happenning you only need the destructors that free up non
+destruction is happening you only need the destructors that free up non
 process local resources to actually execute.
 
 For these constructors you can avoid the mess by simply bailing out if

++++++ Devel-GlobalDestruction-0.11.tar.gz -> 
Devel-GlobalDestruction-0.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Devel-GlobalDestruction-0.11/Changes 
new/Devel-GlobalDestruction-0.12/Changes
--- old/Devel-GlobalDestruction-0.11/Changes    2013-04-03 17:55:19.000000000 
+0200
+++ new/Devel-GlobalDestruction-0.12/Changes    2013-11-01 17:05:21.000000000 
+0100
@@ -1,3 +1,9 @@
+0.12  Fri, 01 Nov 2013
+  * Fix detection when loaded during global destruction by checking B::main_cv
+    instead of B::main_start
+  * Bump Sub::Exporter::Progressive dependency to fix loading in global
+    destruction
+
 0.11  Wed, 03 Apr 2013
   * Fix upgrading from version 0.09 or older
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Devel-GlobalDestruction-0.11/MANIFEST 
new/Devel-GlobalDestruction-0.12/MANIFEST
--- old/Devel-GlobalDestruction-0.11/MANIFEST   2013-04-03 17:55:52.000000000 
+0200
+++ new/Devel-GlobalDestruction-0.12/MANIFEST   2013-11-01 17:06:49.000000000 
+0100
@@ -8,6 +8,7 @@
 t/03_minusc.t
 t/04_phases.t
 t/05_thread_clone.t
+t/06_load-in-gd.t
 t/10_pure-perl.t
 META.yml                                 Module YAML meta-data (added by 
MakeMaker)
 META.json                                Module JSON meta-data (added by 
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Devel-GlobalDestruction-0.11/META.json 
new/Devel-GlobalDestruction-0.12/META.json
--- old/Devel-GlobalDestruction-0.11/META.json  2013-04-03 17:55:52.000000000 
+0200
+++ new/Devel-GlobalDestruction-0.12/META.json  2013-11-01 17:06:49.000000000 
+0100
@@ -4,7 +4,7 @@
       "unknown"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter 
version 2.130880",
+   "generated_by" : "ExtUtils::MakeMaker version 6.8, CPAN::Meta::Converter 
version 2.132830",
    "license" : [
       "perl_5"
    ],
@@ -32,7 +32,7 @@
       },
       "runtime" : {
          "requires" : {
-            "Sub::Exporter::Progressive" : "0.001006"
+            "Sub::Exporter::Progressive" : "0.001011"
          }
       }
    },
@@ -46,5 +46,5 @@
          "url" : 
"git://git.shadowcat.co.uk/p5sagit/Devel-GlobalDestruction.git"
       }
    },
-   "version" : "0.11"
+   "version" : "0.12"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Devel-GlobalDestruction-0.11/META.yml 
new/Devel-GlobalDestruction-0.12/META.yml
--- old/Devel-GlobalDestruction-0.11/META.yml   2013-04-03 17:55:52.000000000 
+0200
+++ new/Devel-GlobalDestruction-0.12/META.yml   2013-11-01 17:06:49.000000000 
+0100
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::CBuilder: 0.27
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter version 
2.130880'
+generated_by: 'ExtUtils::MakeMaker version 6.8, CPAN::Meta::Converter version 
2.132830'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -18,9 +18,9 @@
     - t
     - inc
 requires:
-  Sub::Exporter::Progressive: 0.001006
+  Sub::Exporter::Progressive: 0.001011
 resources:
   bugtracker: 
http://rt.cpan.org/Public/Dist/Display.html?Name=Devel-GlobalDestruction
   homepage: http://search.cpan.org/dist/Devel-GlobalDestruction
   repository: git://git.shadowcat.co.uk/p5sagit/Devel-GlobalDestruction.git
-version: 0.11
+version: 0.12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Devel-GlobalDestruction-0.11/Makefile.PL 
new/Devel-GlobalDestruction-0.12/Makefile.PL
--- old/Devel-GlobalDestruction-0.11/Makefile.PL        2013-04-03 
17:36:35.000000000 +0200
+++ new/Devel-GlobalDestruction-0.12/Makefile.PL        2013-11-01 
17:03:48.000000000 +0100
@@ -19,14 +19,26 @@
   }
 }}
 
+use Text::ParseWords;
+
+sub parse_args {
+  # copied from EUMM
+  ExtUtils::MakeMaker::parse_args(
+    my $tmp = {},
+    Text::ParseWords::shellwords($ENV{PERL_MM_OPT} || ''),
+    @ARGV,
+  );
+  return $tmp->{ARGS} || {};
+}
+
 my $mymeta_works = eval { ExtUtils::MakeMaker->VERSION('6.5707'); 1 };
 my $mymeta = $mymeta_works || eval { ExtUtils::MakeMaker->VERSION('6.5702'); 1 
};
 
 my %META_BITS = (
 );
 my %RUN_DEPS = (
-  'Sub::Exporter::Progressive' => '0.001006',
-  ( (defined ${^GLOBAL_PHASE} or !can_xs() )
+  'Sub::Exporter::Progressive' => '0.001011',
+  ( (defined ${^GLOBAL_PHASE} or parse_args()->{PUREPERL_ONLY} or !can_xs() )
     ? ()
     : ('Devel::GlobalDestruction::XS' => 0)
   ),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Devel-GlobalDestruction-0.11/lib/Devel/GlobalDestruction.pm 
new/Devel-GlobalDestruction-0.12/lib/Devel/GlobalDestruction.pm
--- old/Devel-GlobalDestruction-0.11/lib/Devel/GlobalDestruction.pm     
2013-04-03 17:55:19.000000000 +0200
+++ new/Devel-GlobalDestruction-0.12/lib/Devel/GlobalDestruction.pm     
2013-11-01 17:04:39.000000000 +0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.11';
+our $VERSION = '0.12';
 
 use Sub::Exporter::Progressive -setup => {
   exports => [ qw(in_global_destruction) ],
@@ -27,17 +27,11 @@
   # the eval already installed everything, nothing to do
 }
 else {
-  # internally, PL_main_start is nulled immediately before entering global 
destruction
-  # and we can use B to detect that.  It will also be null before the main 
runloop starts,
-  # so we check install a CHECK if needed to detect that.
+  # internally, PL_main_cv is set to Nullcv immediately before entering
+  # global destruction and we can use B to detect that.  B::main_cv will
+  # only ever be a B::CV or a B::SPECIAL that is a reference to 0
   require B;
-  my $started = !B::main_start()->isa(q[B::NULL]);
-  unless ($started) {
-    # work around 5.6 eval bug
-    eval '0 && $started; CHECK { $started = 1 }; 1'
-      or die $@;
-  }
-  eval '0 && $started; sub in_global_destruction () { $started && 
B::main_start()->isa(q[B::NULL]) }; 1'
+  eval 'sub in_global_destruction () { ${B::main_cv()} == 0 }; 1'
     or die $@;
 }
 
@@ -70,7 +64,7 @@
 because it's not ordered and objects can sometimes disappear.
 
 Writing defensive destructors is hard and annoying, and usually if global
-destruction is happenning you only need the destructors that free up non
+destruction is happening you only need the destructors that free up non
 process local resources to actually execute.
 
 For these constructors you can avoid the mess by simply bailing out if global
@@ -87,7 +81,7 @@
 
 Returns true if the interpreter is in global destruction. In perl 5.14+, this
 returns C<${^GLOBAL_PHASE} eq 'DESTRUCT'>, and on earlier perls, detects it 
using
-the value of C<PL_main_start> or C<PL_dirty>.
+the value of C<PL_main_cv> or C<PL_dirty>.
 
 =back
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Devel-GlobalDestruction-0.11/t/06_load-in-gd.t 
new/Devel-GlobalDestruction-0.12/t/06_load-in-gd.t
--- old/Devel-GlobalDestruction-0.11/t/06_load-in-gd.t  1970-01-01 
01:00:00.000000000 +0100
+++ new/Devel-GlobalDestruction-0.12/t/06_load-in-gd.t  2013-11-01 
17:03:48.000000000 +0100
@@ -0,0 +1,33 @@
+use strict;
+use warnings;
+
+BEGIN {
+  if ($ENV{DEVEL_GLOBALDESTRUCTION_PP_TEST}) {
+    unshift @INC, sub {
+      die 'no XS' if $_[1] eq 'Devel/GlobalDestruction/XS.pm';
+    };
+  }
+}
+
+{
+  package Test::Scope::Guard;
+  sub new { my ($class, $code) = @_; bless [$code], $class; }
+  sub DESTROY { my $self = shift; $self->[0]->() }
+}
+
+use POSIX qw(_exit);
+
+$|++;
+print "1..3\n";
+
+our $alive = Test::Scope::Guard->new(sub {
+  require Devel::GlobalDestruction;
+  my $gd = Devel::GlobalDestruction::in_global_destruction();
+  print(($gd ? '' : 'not ') . "ok 3 - global destruct detected when loaded 
during GD\n");
+  _exit($gd ? 0 : 1);
+});
+
+print(($alive ? '' : 'not ') . "ok 1 - alive during runtime\n");
+END {
+  print(($alive ? '' : 'not ') . "ok 2 - alive during END\n");
+}

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to