@@ -1,5 +1,9 @@
Revision history for Perl extension Guard
+1.023 Thu Nov 20 19:12:58 CET 2014
+ - work around backwards compatibility breakage in perl 5.22
+ (removal of PL_sv_objcount).
+
1.022 Sat Jul 2 02:38:21 CEST 2011
- document how () after the function name overrides the
prototype.
@@ -9,7 +13,7 @@ Revision history for Perl extension Guard
- try to provide compatibility to pre-5.8.8.
1.02 Sat Apr 11 06:42:06 CEST 2009
- - set NODEBUG on scope_guard, to work around -d: modules
+ - set NODEBUG on scope_guard, to work around -d:-modules
causing scope_guard to be called in the wrong context.
1.01 Wed Jan 14 00:30:18 CET 2009
@@ -24,7 +28,7 @@ Revision history for Perl extension Guard
0.5 Sat Dec 13 22:46:46 CET 2008
- vastly improve documentation,
clarify local/scope_guard ordering
- and give a niftier examples.
+ and give niftier examples.
- always bless guard objects and convert
Guard::cancel to a method, at an 8% runtime
cost.
@@ -44,7 +44,7 @@ package Guard;
no warnings;
BEGIN {
- $VERSION = '1.022';
+ $VERSION = 1.023;
@ISA = qw(Exporter);
@EXPORT = qw(guard scope_guard);
@@ -4,6 +4,14 @@
#include "perl.h"
#include "XSUB.h"
+#include "patchlevel.h"
+
+#define PERL_VERSION_ATLEAST(a,b,c) \
+ (PERL_REVISION > (a) \
+ || (PERL_REVISION == (a) \
+ && (PERL_VERSION > (b) \
+ || (PERL_VERSION == (b) && PERL_SUBVERSION >= (c)))))
+
/* apparently < 5.8.8 */
#ifndef SvSTASH_set
# define SvSTASH_set(x,a) SvSTASH(x) = (a)
@@ -104,13 +112,15 @@ guard (SV *block)
PROTOTYPE: &
CODE:
{
- SV *cv = guard_get_cv (aTHX_ block);
+ SV *cv = guard_get_cv (aTHX_ block);
SV *guard = NEWSV (0, 0);
SvUPGRADE (guard, SVt_PVMG);
sv_magicext (guard, cv, PERL_MAGIC_ext, &guard_vtbl, 0, 0);
RETVAL = newRV_noinc (guard);
SvOBJECT_on (guard);
+#if !PERL_VERSION_ATLEAST(5,18,0)
++PL_sv_objcount;
+#endif
SvSTASH_set (guard, (HV*)SvREFCNT_inc ((SV *)guard_stash));
}
OUTPUT:
@@ -9,4 +9,5 @@ t/00_load.t
t/01_scoped.t
t/02_guard.t
t/03_die.t
-META.json Module meta-data (added by MakeMaker)
+META.yml Module YAML meta-data (added by MakeMaker)
+META.json Module JSON meta-data (added by MakeMaker)
@@ -1,26 +1,39 @@
{
+ "abstract" : "unknown",
+ "author" : [
+ "unknown"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.142060",
+ "license" : [
+ "unknown"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Guard",
"no_index" : {
"directory" : [
"t",
"inc"
]
},
- "meta-spec" : {
- "version" : 1.4,
- "url" : "http://module-build.sourceforge.net/META-spec-v1.4.html"
- },
- "generated_by" : "ExtUtils::MakeMaker::JSONMETA version 7.000",
- "distribution_type" : "module",
- "version" : "1.022",
- "name" : "Guard",
- "author" : [],
- "license" : "unknown",
- "build_requires" : {
- "ExtUtils::MakeMaker" : 0
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {}
+ }
},
- "requires" : {},
- "abstract" : null,
- "configure_requires" : {
- "ExtUtils::MakeMaker" : 0
- }
+ "release_status" : "stable",
+ "version" : 1.023
}
@@ -0,0 +1,21 @@
+---
+abstract: unknown
+author:
+ - unknown
+build_requires:
+ ExtUtils::MakeMaker: '0'
+configure_requires:
+ ExtUtils::MakeMaker: '0'
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.142060'
+license: unknown
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: Guard
+no_index:
+ directory:
+ - t
+ - inc
+requires: {}
+version: 1.023