r77611 - in /trunk/libindirect-perl: ./ debian/ lib/ samples/ t/ t/lib/indirect/Test0/Oooooo/
angelabad-guest at users.alioth.debian.org
angelabad-guest at users.alioth.debian.org
Tue Jul 19 15:36:32 UTC 2011
Author: angelabad-guest
Date: Tue Jul 19 15:36:31 2011
New Revision: 77611
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77611
Log:
* New upstream release
* debian/copyright:
- Update copyright years
- Update license stanzas
* Bump to debhelper compat 8
* Bump Standards-Version to 3.9.2 (no changes)
Added:
trunk/libindirect-perl/META.json
- copied unchanged from r77610, branches/upstream/libindirect-perl/current/META.json
trunk/libindirect-perl/t/31-hints.t
- copied unchanged from r77610, branches/upstream/libindirect-perl/current/t/31-hints.t
Modified:
trunk/libindirect-perl/Changes
trunk/libindirect-perl/MANIFEST
trunk/libindirect-perl/META.yml
trunk/libindirect-perl/README
trunk/libindirect-perl/debian/changelog
trunk/libindirect-perl/debian/compat
trunk/libindirect-perl/debian/control
trunk/libindirect-perl/debian/copyright
trunk/libindirect-perl/indirect.xs
trunk/libindirect-perl/lib/indirect.pm
trunk/libindirect-perl/ptable.h
trunk/libindirect-perl/samples/indirect.pl
trunk/libindirect-perl/t/20-good.t
trunk/libindirect-perl/t/21-bad.t
trunk/libindirect-perl/t/30-scope.t
trunk/libindirect-perl/t/40-threads.t
trunk/libindirect-perl/t/41-threads-teardown.t
trunk/libindirect-perl/t/50-external.t
trunk/libindirect-perl/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
Modified: trunk/libindirect-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/Changes?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/Changes (original)
+++ trunk/libindirect-perl/Changes Tue Jul 19 15:36:31 2011
@@ -1,4 +1,17 @@
Revision history for indirect
+
+0.24 2011-07-17 23:15 UTC
+ + Fix : [RT #64521] : "no indirect" leaking into eval.
+ This is currently only fixed for perl 5.10 (perl 5.12 and
+ higher were never affected). It was caused by a very stupid
+ mistake of mine that was introduced in indirect version 0.23.
+ Thanks Michael G Schwern for reporting.
+ + Fix : [RT #69291] : indirect.pm breaks %^H.
+ This was caused by the same mistake as for the previous bug,
+ and as such it is also only fixed for perl 5.10 (and never
+ affected perl 5.12).
+ Thanks Andrew Main for reporting.
+ + Doc : C++ compilers are officially NOT supported.
0.23 2010-10-03 00:15 UTC
+ Fix : Some indirect constructs could be incorrectly reported when
Modified: trunk/libindirect-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/MANIFEST?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/MANIFEST (original)
+++ trunk/libindirect-perl/MANIFEST Tue Jul 19 15:36:31 2011
@@ -1,5 +1,6 @@
Changes
MANIFEST
+META.json
META.yml
Makefile.PL
README
@@ -17,6 +18,7 @@
t/22-bad-mixed.t
t/23-bad-notaint.t
t/30-scope.t
+t/31-hints.t
t/40-threads.t
t/41-threads-teardown.t
t/45-memory.t
Modified: trunk/libindirect-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/META.yml?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/META.yml (original)
+++ trunk/libindirect-perl/META.yml Tue Jul 19 15:36:31 2011
@@ -1,31 +1,30 @@
---- #YAML:1.0
-name: indirect
-version: 0.23
-abstract: Lexically warn about using the indirect object syntax.
+---
+abstract: 'Lexically warn about using the indirect object syntax.'
author:
- - Vincent Pit <perl at profvince.com>
-license: perl
-distribution_type: module
+ - 'Vincent Pit <perl at profvince.com>'
+build_requires:
+ ExtUtils::MakeMaker: 0
+ Test::More: 0
+ XSLoader: 0
configure_requires:
- ExtUtils::MakeMaker: 0
-build_requires:
- ExtUtils::MakeMaker: 0
- Test::More: 0
- XSLoader: 0
+ ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.58, CPAN::Meta::Converter version 2.110930001'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: indirect
+no_index:
+ directory:
+ - t
+ - inc
requires:
- perl: 5.008001
- XSLoader: 0
+ XSLoader: 0
+ perl: 5.008001
resources:
- bugtracker: http://rt.cpan.org/NoAuth/ReportBug.html?Queue=indirect
- homepage: http://search.cpan.org/dist/indirect/
- license: http://dev.perl.org/licenses/
- repository: http://git.profvince.com/?p=perl%2Fmodules%2Findirect.git
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.56
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
-dynamic_config: 1
+ bugtracker: http://rt.cpan.org/NoAuth/ReportBug.html?Queue=indirect
+ homepage: http://search.cpan.org/dist/indirect/
+ license: http://dev.perl.org/licenses/
+ repository: http://git.profvince.com/?p=perl%2Fmodules%2Findirect.git
+version: 0.24
Modified: trunk/libindirect-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/README?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/README (original)
+++ trunk/libindirect-perl/README Tue Jul 19 15:36:31 2011
@@ -2,7 +2,7 @@
indirect - Lexically warn about using the indirect object syntax.
VERSION
- Version 0.23
+ Version 0.24
SYNOPSIS
# In a script
@@ -124,6 +124,9 @@
DEPENDENCIES
perl 5.8.1.
+ A C compiler. This module may happen to build with a C++ compiler as
+ well, but don't rely on it, as no guarantee is made in this regard.
+
XSLoader (standard since perl 5.006).
AUTHOR
@@ -153,7 +156,7 @@
reporting issues.
COPYRIGHT & LICENSE
- Copyright 2008,2009,2010 Vincent Pit, all rights reserved.
+ Copyright 2008,2009,2010,2011 Vincent Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: trunk/libindirect-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/debian/changelog?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/debian/changelog (original)
+++ trunk/libindirect-perl/debian/changelog Tue Jul 19 15:36:31 2011
@@ -1,3 +1,14 @@
+libindirect-perl (0.24-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/copyright:
+ - Update copyright years
+ - Update license stanzas
+ * Bump to debhelper compat 8
+ * Bump Standards-Version to 3.9.2 (no changes)
+
+ -- Angel Abad <angelabad at gmail.com> Tue, 19 Jul 2011 17:36:24 +0200
+
libindirect-perl (0.23-1) unstable; urgency=low
* New upstream release
Modified: trunk/libindirect-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/debian/compat?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/debian/compat (original)
+++ trunk/libindirect-perl/debian/compat Tue Jul 19 15:36:31 2011
@@ -1,1 +1,1 @@
-7
+8
Modified: trunk/libindirect-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/debian/control?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/debian/control (original)
+++ trunk/libindirect-perl/debian/control Tue Jul 19 15:36:31 2011
@@ -1,15 +1,19 @@
Source: libindirect-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7), libtest-kwalitee-perl,
- libtest-pod-coverage-perl, libtest-pod-perl, libtest-portability-files-perl,
+Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
+Uploaders: Ivan Kohler <ivan-debian at 420.am>,
+ Angel Abad <angelabad at gmail.com>
+Build-Depends: debhelper (>= 8),
+ libtest-kwalitee-perl,
+ libtest-pod-coverage-perl,
+ libtest-pod-perl,
+ libtest-portability-files-perl,
perl
-Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Ivan Kohler <ivan-debian at 420.am>, Angel Abad <angelabad at gmail.com>
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libindirect-perl/
+Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libindirect-perl/
Homepage: http://search.cpan.org/dist/indirect/
-Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libindirect-perl/
-Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libindirect-perl/
Package: libindirect-perl
Architecture: any
Modified: trunk/libindirect-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/debian/copyright?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/debian/copyright (original)
+++ trunk/libindirect-perl/debian/copyright Tue Jul 19 15:36:31 2011
@@ -8,7 +8,7 @@
License: Artistic or GPL-1+
Files: debian/*
-Copyright: 2010, Angel Abad <angelabad at gmail.com>
+Copyright: 2010-2011, Angel Abad <angelabad at gmail.com>
2010, Ivan Kohler <ivan-debian at 420.am>
License: Artistic or GPL-1+
@@ -16,8 +16,8 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License, which comes with Perl.
.
- On Debian GNU/Linux systems, the complete text of the Artistic License
- can be found in `/usr/share/common-licenses/Artistic'.
+ On Debian systems, the complete text of the Artistic License can be
+ found in `/usr/share/common-licenses/Artistic'.
License: GPL-1+
This program is free software; you can redistribute it and/or modify
@@ -25,5 +25,5 @@
the Free Software Foundation; either version 1, or (at your option)
any later version.
.
- On Debian GNU/Linux systems, the complete text of version 1 of the
- General Public License can be found in `/usr/share/common-licenses/GPL-1'.
+ On Debian systems, the complete text of version 1 of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-1'.
Modified: trunk/libindirect-perl/indirect.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/indirect.xs?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/indirect.xs (original)
+++ trunk/libindirect-perl/indirect.xs Tue Jul 19 15:36:31 2011
@@ -84,7 +84,7 @@
#endif
#ifndef I_WORKAROUND_REQUIRE_PROPAGATION
-# define I_WORKAROUND_REQUIRE_PROPAGATION !I_HAS_PERL(5, 12, 0)
+# define I_WORKAROUND_REQUIRE_PROPAGATION !I_HAS_PERL(5, 10, 1)
#endif
/* ... Thread safety and multiplicity ...................................... */
@@ -200,6 +200,7 @@
#include "ptable.h"
#define ptable_store(T, K, V) ptable_store(aTHX_ (T), (K), (V))
+#define ptable_delete(T, K) ptable_delete(aTHX_ (T), (K))
#define ptable_clear(T) ptable_clear(aTHX_ (T))
#define ptable_free(T) ptable_free(aTHX_ (T))
@@ -329,7 +330,6 @@
#define indirect_tag(V) indirect_tag(aTHX_ (V))
indirect_hint_t *h;
SV *code = NULL;
- dMY_CXT;
if (SvROK(value)) {
value = SvRV(value);
@@ -350,10 +350,13 @@
#endif /* !I_HINT_STRUCT */
#if I_THREADSAFE
- /* We only need for the key to be an unique tag for looking up the value later.
- * Allocated memory provides convenient unique identifiers, so that's why we
- * use the hint as the key itself. */
- ptable_hints_store(MY_CXT.tbl, h, h);
+ {
+ dMY_CXT;
+ /* We only need for the key to be an unique tag for looking up the value later
+ * Allocated memory provides convenient unique identifiers, so that's why we
+ * use the hint as the key itself. */
+ ptable_hints_store(MY_CXT.tbl, h, h);
+ }
#endif /* I_THREADSAFE */
return newSViv(PTR2IV(h));
@@ -362,14 +365,16 @@
STATIC SV *indirect_detag(pTHX_ const SV *hint) {
#define indirect_detag(H) indirect_detag(aTHX_ (H))
indirect_hint_t *h;
- dMY_CXT;
if (!(hint && SvIOK(hint)))
return NULL;
h = INT2PTR(indirect_hint_t *, SvIVX(hint));
#if I_THREADSAFE
- h = ptable_fetch(MY_CXT.tbl, h);
+ {
+ dMY_CXT;
+ h = ptable_fetch(MY_CXT.tbl, h);
+ }
#endif /* I_THREADSAFE */
#if I_WORKAROUND_REQUIRE_PROPAGATION
@@ -384,16 +389,31 @@
STATIC SV *indirect_hint(pTHX) {
#define indirect_hint() indirect_hint(aTHX)
- SV **val;
+ SV *hint;
if (IN_PERL_RUNTIME)
return NULL;
- val = hv_fetch(GvHV(PL_hintgv), __PACKAGE__, __PACKAGE_LEN__, indirect_hash);
- if (!val)
- return NULL;
-
- return indirect_detag(*val);
+#ifdef cop_hints_fetch_pvn
+ hint = cop_hints_fetch_pvn(PL_curcop, __PACKAGE__, __PACKAGE_LEN__,
+ indirect_hash, 0);
+#elif I_HAS_PERL(5, 9, 5)
+ hint = Perl_refcounted_he_fetch(aTHX_ PL_curcop->cop_hints_hash,
+ NULL,
+ __PACKAGE__, __PACKAGE_LEN__,
+ 0,
+ indirect_hash);
+#else
+ {
+ SV **val = hv_fetch(GvHV(PL_hintgv), __PACKAGE__, __PACKAGE_LEN__,
+ indirect_hash);
+ if (!val)
+ return 0;
+ hint = *val;
+ }
+#endif
+
+ return indirect_detag(hint);
}
/* ... op -> source position ............................................... */
@@ -442,7 +462,7 @@
#define indirect_map_delete(O) indirect_map_delete(aTHX_ (O))
dMY_CXT;
- ptable_store(MY_CXT.map, o, NULL);
+ ptable_delete(MY_CXT.map, o);
}
/* --- Check functions ----------------------------------------------------- */
@@ -789,8 +809,6 @@
STATIC U32 indirect_initialized = 0;
STATIC void indirect_teardown(pTHX_ void *root) {
- dMY_CXT;
-
if (!indirect_initialized)
return;
@@ -799,10 +817,13 @@
return;
#endif
- ptable_free(MY_CXT.map);
+ {
+ dMY_CXT;
+ ptable_free(MY_CXT.map);
#if I_THREADSAFE
- ptable_hints_free(MY_CXT.tbl);
-#endif
+ ptable_hints_free(MY_CXT.tbl);
+#endif
+ }
PL_check[OP_CONST] = MEMBER_TO_FPTR(indirect_old_ck_const);
indirect_old_ck_const = 0;
Modified: trunk/libindirect-perl/lib/indirect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/lib/indirect.pm?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/lib/indirect.pm (original)
+++ trunk/libindirect-perl/lib/indirect.pm Tue Jul 19 15:36:31 2011
@@ -11,13 +11,13 @@
=head1 VERSION
-Version 0.23
+Version 0.24
=cut
our $VERSION;
BEGIN {
- $VERSION = '0.23';
+ $VERSION = '0.24';
}
=head1 SYNOPSIS
@@ -194,6 +194,9 @@
L<perl> 5.8.1.
+A C compiler.
+This module may happen to build with a C++ compiler as well, but don't rely on it, as no guarantee is made in this regard.
+
L<XSLoader> (standard since perl 5.006).
=head1 AUTHOR
@@ -223,7 +226,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2008,2009,2010 Vincent Pit, all rights reserved.
+Copyright 2008,2009,2010,2011 Vincent Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/libindirect-perl/ptable.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/ptable.h?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/ptable.h (original)
+++ trunk/libindirect-perl/ptable.h Tue Jul 19 15:36:31 2011
@@ -8,6 +8,13 @@
/* This header is designed to be included several times with different
* definitions for PTABLE_NAME and PTABLE_VAL_FREE(). */
+
+#undef VOID2
+#ifdef __cplusplus
+# define VOID2(T, P) static_cast<T>(P)
+#else
+# define VOID2(T, P) (P)
+#endif
#undef pPTBLMS
#undef pPTBLMS_
@@ -22,7 +29,7 @@
# define aPTBLMS aTHX
# define aPTBLMS_ aTHX_
#else
-# define pPTBLMS
+# define pPTBLMS void
# define pPTBLMS_
# define aPTBLMS
# define aPTBLMS_
@@ -79,10 +86,11 @@
#ifndef ptable_new
STATIC ptable *ptable_new(pPTBLMS) {
#define ptable_new() ptable_new(aPTBLMS)
- ptable *t = PerlMemShared_malloc(sizeof *t);
- t->max = 15;
- t->items = 0;
- t->ary = PerlMemShared_calloc(t->max + 1, sizeof *t->ary);
+ ptable *t = VOID2(ptable *, PerlMemShared_malloc(sizeof *t));
+ t->max = 15;
+ t->items = 0;
+ t->ary = VOID2(ptable_ent **,
+ PerlMemShared_calloc(t->max + 1, sizeof *t->ary));
return t;
}
#endif /* !ptable_new */
@@ -125,7 +133,7 @@
size_t newsize = oldsize * 2;
size_t i;
- ary = PerlMemShared_realloc(ary, newsize * sizeof(*ary));
+ ary = VOID2(ptable_ent **, PerlMemShared_realloc(ary, newsize * sizeof(*ary)));
Zero(&ary[oldsize], newsize - oldsize, sizeof(*ary));
t->max = --newsize;
t->ary = ary;
@@ -157,7 +165,7 @@
ent->val = val;
} else if (val) {
const size_t i = PTABLE_HASH(key) & t->max;
- ent = PerlMemShared_malloc(sizeof *ent);
+ ent = VOID2(ptable_ent *, PerlMemShared_malloc(sizeof *ent));
ent->key = key;
ent->val = val;
ent->next = t->ary[i];
@@ -165,6 +173,27 @@
t->items++;
if (ent->next && t->items > t->max)
ptable_split(t);
+ }
+}
+
+STATIC void PTABLE_PREFIX(_delete)(pPTBL_ ptable * const t, const void * const key) {
+ ptable_ent *prev, *ent;
+ const size_t i = PTABLE_HASH(key) & t->max;
+
+ prev = NULL;
+ ent = t->ary[i];
+ for (; ent; prev = ent, ent = ent->next) {
+ if (ent->key == key)
+ break;
+ }
+
+ if (ent) {
+ if (prev)
+ prev->next = ent->next;
+ else
+ t->ary[i] = ent->next;
+ PTABLE_VAL_FREE(ent->val);
+ PerlMemShared_free(ent);
}
}
@@ -177,7 +206,8 @@
do {
ptable_ent *entry;
for (entry = array[i]; entry; entry = entry->next)
- cb(aTHX_ entry, userdata);
+ if (entry->val)
+ cb(aTHX_ entry, userdata);
} while (i--);
}
}
Modified: trunk/libindirect-perl/samples/indirect.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/samples/indirect.pl?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/samples/indirect.pl (original)
+++ trunk/libindirect-perl/samples/indirect.pl Tue Jul 19 15:36:31 2011
@@ -3,7 +3,7 @@
#use strict;
#use warnings;
-use lib qw{blib/lib blib/arch};
+use lib qw<blib/lib blib/arch>;
sub Hlagh::new { my $class = shift; bless { }, ref($class) || $class ; }
Modified: trunk/libindirect-perl/t/20-good.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/t/20-good.t?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/t/20-good.t (original)
+++ trunk/libindirect-perl/t/20-good.t Tue Jul 19 15:36:31 2011
@@ -155,7 +155,7 @@
####
$obj = $pkg->$cb( $obj );
####
-$obj = $pkg->$cb(qw/foo bar baz/);
+$obj = $pkg->$cb(qw<foo bar baz>);
####
$obj = $pkg->$meth;
####
@@ -192,9 +192,9 @@
meh $y;
####
meh $y, 1, 2;
-#### $] < 5.010 # use feature 'state'; state $z
+#### "$]" < 5.010 # use feature 'state'; state $z
meh $z;
-#### $] < 5.010 # use feature 'state'; state $z
+#### "$]" < 5.010 # use feature 'state'; state $z
meh $z, 1, 2;
####
print;
@@ -208,9 +208,9 @@
print $y;
####
print $y "dongs\n";
-#### $] < 5.010 # use feature 'state'; state $z
+#### "$]" < 5.010 # use feature 'state'; state $z
print $z;
-#### $] < 5.010 # use feature 'state'; state $z
+#### "$]" < 5.010 # use feature 'state'; state $z
print $z "hlagh\n";
####
print STDOUT "bananananananana\n";
Modified: trunk/libindirect-perl/t/21-bad.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/t/21-bad.t?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/t/21-bad.t (original)
+++ trunk/libindirect-perl/t/21-bad.t Tue Jul 19 15:36:31 2011
@@ -101,7 +101,7 @@
SKIP:
{
skip 'No space tests on perl 5.11' => 4 + @expected
- if $] >= 5.011 and $] < 5.012;
+ if "$]" >= 5.011 and "$]" < 5.012;
my $code = $code;
$code =~ s/\$/\$ \n\t /g;
@@ -219,7 +219,7 @@
----
[ 'new', '$x' ]
####
-$obj = new $x(qw/bar baz/);
+$obj = new $x(qw<bar baz>);
----
[ 'new', '$x' ]
####
@@ -280,15 +280,15 @@
meh $y, 1, 2;
----
[ 'meh', '$y' ]
-#### $] < 5.010 # use feature 'state'; state $z
+#### "$]" < 5.010 # use feature 'state'; state $z
meh $z;
----
[ 'meh', '$z' ]
-#### $] < 5.010 # use feature 'state'; state $z
+#### "$]" < 5.010 # use feature 'state'; state $z
meh $z 1, 2;
----
[ 'meh', '$z' ]
-#### $] < 5.010 # use feature 'state'; state $z
+#### "$]" < 5.010 # use feature 'state'; state $z
meh $z, 1, 2;
----
[ 'meh', '$z' ]
Modified: trunk/libindirect-perl/t/30-scope.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/t/30-scope.t?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/t/30-scope.t (original)
+++ trunk/libindirect-perl/t/30-scope.t Tue Jul 19 15:36:31 2011
@@ -6,7 +6,7 @@
my $tests;
BEGIN { $tests = 18 }
-use Test::More tests => (1 + $tests + 1) + 3 + 3 + 3 + 5 + 4 + 5;
+use Test::More tests => (1 + $tests + 1) + 2 + 3 + 3 + 3 + 5 + 4 + 5;
BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} }
@@ -73,7 +73,7 @@
}
}
is $@, '', "no indirect; eval 'my \$x = new Bar'";
- if ($] < 5.009005) {
+ if ("$]" < 5.009005) {
is @w, 0, 'no warnings caught';
pass 'placeholder';
} else {
@@ -83,6 +83,20 @@
}
}
+SKIP: {
+ skip 'The pragma doesn\'t propagte into eval STRING before perl 5.10' => 2
+ if "$]" < 5.009005;
+ my @w;
+ my $test = sub { eval 'return; new XYZ' };
+ {
+ local $SIG{__WARN__} = sub { push @w, join '', 'warn:', @_ };
+ eval 'return; no indirect; BEGIN { $test->() }';
+ }
+ is $@, '', 'eval test doesn\'t croak prematurely';
+ is @w, 0, 'eval did not throw a warning';
+ diag join "\n", 'All warnings:', @w if @w;
+}
+
{
my @w;
{
@@ -102,13 +116,13 @@
eval "return; no indirect; use indirect::TestRequired2; my \$x = new Bar;";
}
is $@, '', 'second require test doesn\'t croak prematurely';
- @w = grep !/^warn:Attempt\s+to\s+free\s+unreferenced/, @w if $] <= 5.008003;
+ @w = grep !/^warn:Attempt\s+to\s+free\s+unreferenced/, @w if "$]" <= 5.008003;
my $w = shift @w;
like $w, expect('Baz', 't/lib/indirect/TestRequired2.pm'),
'second require test caught error for Baz';
SKIP: {
skip 'The pragma doesn\'t propagte into eval STRING before perl 5.10' => 1
- if $] < 5.009005;
+ if "$]" < 5.009005;
$w = shift @w;
like $w, expect('Blech'), 'second require test caught error for Blech';
}
@@ -132,14 +146,14 @@
new indirect::TestRequired3Z;
}
TESTREQUIRED3
- @w = grep !/^warn:Attempt\s+to\s+free\s+unreferenced/, @w if $] <= 5.008003;
+ @w = grep !/^warn:Attempt\s+to\s+free\s+unreferenced/, @w if "$]" <= 5.008003;
is $@, '',
"pragma leak when reusing callback test doesn't croak prematurely";
is_deeply \@w, [ ],
"pragma leak when reusing callback test doesn't warn";
- is_deeply \@err, [ map "indirect::TestRequired3$_", qw/X Z/ ],
+ is_deeply \@err, [ map "indirect::TestRequired3$_", qw<X Z> ],
"pragma leak when reusing callback test caught the right errors";
- is_deeply \@main::new, [ map "indirect::TestRequired3$_", qw/X Y Z/ ],
+ is_deeply \@main::new, [ map "indirect::TestRequired3$_", qw<X Y Z> ],
"pragma leak when reusing callback test ran the three constructors";
}
Modified: trunk/libindirect-perl/t/40-threads.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/t/40-threads.t?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/t/40-threads.t (original)
+++ trunk/libindirect-perl/t/40-threads.t Tue Jul 19 15:36:31 2011
@@ -9,14 +9,14 @@
Test::More::plan(skip_all => $msg);
}
-use Config qw/%Config/;
+use Config qw<%Config>;
BEGIN {
my $force = $ENV{PERL_INDIRECT_TEST_THREADS} ? 1 : !1;
skipall 'This perl wasn\'t built to support threads'
unless $Config{useithreads};
skipall 'perl 5.13.4 required to test thread safety'
- unless $force or $] >= 5.013004;
+ unless $force or "$]" >= 5.013004;
}
use threads;
@@ -60,7 +60,7 @@
SKIP:
{
skip 'Hints aren\'t propagated into eval STRING below perl 5.10' => 3
- unless $] >= 5.010;
+ unless "$]" >= 5.010;
my $class = "Pineapple$tid";
my @warns;
{
Modified: trunk/libindirect-perl/t/41-threads-teardown.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/t/41-threads-teardown.t?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/t/41-threads-teardown.t (original)
+++ trunk/libindirect-perl/t/41-threads-teardown.t Tue Jul 19 15:36:31 2011
@@ -9,14 +9,14 @@
Test::More::plan(skip_all => $msg);
}
-use Config qw/%Config/;
+use Config qw<%Config>;
BEGIN {
my $force = $ENV{PERL_INDIRECT_TEST_THREADS} ? 1 : !1;
skipall 'This perl wasn\'t built to support threads'
unless $Config{useithreads};
skipall 'perl 5.13.4 required to test thread safety'
- unless $force or $] >= 5.013004;
+ unless $force or "$]" >= 5.013004;
}
use threads;
@@ -43,13 +43,13 @@
SKIP:
{
- skip 'Fails on 5.8.2 and lower' => 1 if $] <= 5.008002;
+ skip 'Fails on 5.8.2 and lower' => 1 if "$]" <= 5.008002;
my $status = run_perl <<' RUN';
my ($code, @expected);
BEGIN {
$code = 2;
- @expected = qw/X Z/;
+ @expected = qw<X Z>;
}
sub cb { --$code if $_[0] eq shift(@expected) || q{DUMMY} }
use threads;
Modified: trunk/libindirect-perl/t/50-external.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/t/50-external.t?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/t/50-external.t (original)
+++ trunk/libindirect-perl/t/50-external.t Tue Jul 19 15:36:31 2011
@@ -24,7 +24,7 @@
SKIP:
{
- skip 'Fixed in core only since 5.12' => 1 unless $] >= 5.012;
+ skip 'Fixed in core only since 5.12' => 1 unless "$]" >= 5.012;
my $status = run_perl 'no indirect hook => sub { exit 2 }; new X';
is $status, 2 << 8, 'no semicolon at the end of -e';
}
Modified: trunk/libindirect-perl/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libindirect-perl/t/lib/indirect/Test0/Oooooo/Pppppppp.pm?rev=77611&op=diff
==============================================================================
--- trunk/libindirect-perl/t/lib/indirect/Test0/Oooooo/Pppppppp.pm (original)
+++ trunk/libindirect-perl/t/lib/indirect/Test0/Oooooo/Pppppppp.pm Tue Jul 19 15:36:31 2011
@@ -9,7 +9,7 @@
y => sub { };
use indirect::Test0::Fffff::Vvvvvvv
- t => [xxxx=>qw(xxxxxx xxxxxxx)],
+ t => [ xxxx => qw<xxxxxx xxxxxxx> ],
x => sub { $_[0]->method };
1;
More information about the Pkg-perl-cvs-commits
mailing list