r77609 - in /branches/upstream/libindirect-perl/current: ./ 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:26:42 UTC 2011
Author: angelabad-guest
Date: Tue Jul 19 15:26:40 2011
New Revision: 77609
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77609
Log:
[svn-upgrade] new version libindirect-perl (0.24)
Added:
branches/upstream/libindirect-perl/current/META.json
branches/upstream/libindirect-perl/current/t/31-hints.t
Modified:
branches/upstream/libindirect-perl/current/Changes
branches/upstream/libindirect-perl/current/MANIFEST
branches/upstream/libindirect-perl/current/META.yml
branches/upstream/libindirect-perl/current/README
branches/upstream/libindirect-perl/current/indirect.xs
branches/upstream/libindirect-perl/current/lib/indirect.pm
branches/upstream/libindirect-perl/current/ptable.h
branches/upstream/libindirect-perl/current/samples/indirect.pl
branches/upstream/libindirect-perl/current/t/20-good.t
branches/upstream/libindirect-perl/current/t/21-bad.t
branches/upstream/libindirect-perl/current/t/30-scope.t
branches/upstream/libindirect-perl/current/t/40-threads.t
branches/upstream/libindirect-perl/current/t/41-threads-teardown.t
branches/upstream/libindirect-perl/current/t/50-external.t
branches/upstream/libindirect-perl/current/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
Modified: branches/upstream/libindirect-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/Changes?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/Changes (original)
+++ branches/upstream/libindirect-perl/current/Changes Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/MANIFEST?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/MANIFEST (original)
+++ branches/upstream/libindirect-perl/current/MANIFEST Tue Jul 19 15:26:40 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
Added: branches/upstream/libindirect-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/META.json?rev=77609&op=file
==============================================================================
--- branches/upstream/libindirect-perl/current/META.json (added)
+++ branches/upstream/libindirect-perl/current/META.json Tue Jul 19 15:26:40 2011
@@ -1,0 +1,56 @@
+{
+ "abstract" : "Lexically warn about using the indirect object syntax.",
+ "author" : [
+ "Vincent Pit <perl at profvince.com>"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.58, CPAN::Meta::Converter version 2.110930001",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "indirect",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0,
+ "Test::More" : 0,
+ "XSLoader" : 0
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "XSLoader" : 0,
+ "perl" : "5.008001"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=indirect"
+ },
+ "homepage" : "http://search.cpan.org/dist/indirect/",
+ "license" : [
+ "http://dev.perl.org/licenses/"
+ ],
+ "repository" : {
+ "url" : "http://git.profvince.com/?p=perl%2Fmodules%2Findirect.git"
+ }
+ },
+ "version" : "0.24"
+}
Modified: branches/upstream/libindirect-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/META.yml?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/META.yml (original)
+++ branches/upstream/libindirect-perl/current/META.yml Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/README?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/README (original)
+++ branches/upstream/libindirect-perl/current/README Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/indirect.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/indirect.xs?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/indirect.xs (original)
+++ branches/upstream/libindirect-perl/current/indirect.xs Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/lib/indirect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/lib/indirect.pm?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/lib/indirect.pm (original)
+++ branches/upstream/libindirect-perl/current/lib/indirect.pm Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/ptable.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/ptable.h?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/ptable.h (original)
+++ branches/upstream/libindirect-perl/current/ptable.h Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/samples/indirect.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/samples/indirect.pl?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/samples/indirect.pl (original)
+++ branches/upstream/libindirect-perl/current/samples/indirect.pl Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/t/20-good.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/t/20-good.t?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/t/20-good.t (original)
+++ branches/upstream/libindirect-perl/current/t/20-good.t Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/t/21-bad.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/t/21-bad.t?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/t/21-bad.t (original)
+++ branches/upstream/libindirect-perl/current/t/21-bad.t Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/t/30-scope.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/t/30-scope.t?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/t/30-scope.t (original)
+++ branches/upstream/libindirect-perl/current/t/30-scope.t Tue Jul 19 15:26:40 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";
}
Added: branches/upstream/libindirect-perl/current/t/31-hints.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/t/31-hints.t?rev=77609&op=file
==============================================================================
--- branches/upstream/libindirect-perl/current/t/31-hints.t (added)
+++ branches/upstream/libindirect-perl/current/t/31-hints.t Tue Jul 19 15:26:40 2011
@@ -1,0 +1,25 @@
+#!perl -T
+
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+SKIP: {
+ skip 'This would require extensive work to be okay with perl 5.8' => 1
+ if "$]" < 5.010;
+
+ local %^H = (a => 1);
+
+ require indirect;
+
+ # Force %^H repopulation with an Unicode match
+ my $x = "foo";
+ utf8::upgrade($x);
+ $x =~ /foo/i;
+
+ my $hints = join ',',
+ map { $_, defined $^H{$_} ? $^H{$_} : '(undef)' }
+ sort keys(%^H);
+ is $hints, 'a,1', 'indirect does not vivify entries in %^H';
+}
Modified: branches/upstream/libindirect-perl/current/t/40-threads.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/t/40-threads.t?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/t/40-threads.t (original)
+++ branches/upstream/libindirect-perl/current/t/40-threads.t Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/t/41-threads-teardown.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/t/41-threads-teardown.t?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/t/41-threads-teardown.t (original)
+++ branches/upstream/libindirect-perl/current/t/41-threads-teardown.t Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/t/50-external.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/t/50-external.t?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/t/50-external.t (original)
+++ branches/upstream/libindirect-perl/current/t/50-external.t Tue Jul 19 15:26:40 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: branches/upstream/libindirect-perl/current/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libindirect-perl/current/t/lib/indirect/Test0/Oooooo/Pppppppp.pm?rev=77609&op=diff
==============================================================================
--- branches/upstream/libindirect-perl/current/t/lib/indirect/Test0/Oooooo/Pppppppp.pm (original)
+++ branches/upstream/libindirect-perl/current/t/lib/indirect/Test0/Oooooo/Pppppppp.pm Tue Jul 19 15:26:40 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