P::S::XS buggery strikes again
[p5sagit/namespace-clean.git] / t / 07-debugger.t
CommitLineData
80e4e267 1use Test::More;
2
3BEGIN {
ac5c00e9 4 # shut up the debugger
80e4e267 5 $ENV{PERLDB_OPTS} = 'NonStop';
ac5c00e9 6
7 # work aroud the regex + P::S::XS buggery on
8 # < 5.8.6
9 require Package::Stash;
80e4e267 10}
11
12BEGIN {
13
14#line 1
15#!/usr/bin/perl -d
16#line 10
17
18}
19
20{
21 package Foo;
22
23 BEGIN { *baz = sub { 42 } }
24 sub foo { 22 }
25
26 use namespace::clean;
27
28 sub bar {
29 ::is(baz(), 42);
30 ::is(foo(), 22);
31 }
32}
33
34ok( !Foo->can("foo"), "foo cleaned up" );
35ok( !Foo->can("baz"), "baz cleaned up" );
36
37Foo->bar();
38
39done_testing;