Disable the debugger fixup entirely on perl 5.15.5+
[p5sagit/namespace-clean.git] / t / 09-fiddle-hinthash.t
CommitLineData
656ec55b 1use strict;
2use warnings;
3
4use Test::More 0.88;
5
6{
7 package Bar;
8 use sort 'stable';
9 use namespace::clean;
10 use sort 'stable';
11 {
12 1;
13 }
14
15 Test::More::pass('no segfault');
16}
17
18{
19 package Foo;
20 BEGIN {
21 $^H{'foo'} = 'bar';
22 }
23
24 use namespace::clean;
25
26 BEGIN {
27 Test::More::is( $^H{'foo'}, 'bar', 'hinthash intact' );
28 }
29
30 {
31 1;
32 }
33
34 BEGIN {
35 SKIP: {
36 Test::More::skip(
37 'Tied hinthash values not present in extended caller() on perls older than 5.10'
38 .', regardless of mode (PP or XS)',
39 1
40 ) if ($] < 5.010_000);
41 package DB;
42 Test::More::is( ( (caller(0))[10] || {} )->{foo}, 'bar', 'hinthash values visible in caller' );
43 }
44 }
45}
46
47
48done_testing;