P::S::XS buggery strikes again
[p5sagit/namespace-clean.git] / t / 07-debugger.t
1 use Test::More;
2
3 BEGIN {
4   # shut up the debugger
5   $ENV{PERLDB_OPTS} = 'NonStop';
6
7   # work aroud the regex + P::S::XS buggery on
8   # < 5.8.6
9   require Package::Stash;
10 }
11
12 BEGIN {
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
34 ok( !Foo->can("foo"), "foo cleaned up" );
35 ok( !Foo->can("baz"), "baz cleaned up" );
36
37 Foo->bar();
38
39 done_testing;