Restrict debugger workaround to when DB::sub will be used
[p5sagit/namespace-clean.git] / t / 07-pseudo-debugger.t
CommitLineData
aea0cfbe 1use warnings;
2use strict;
3
4use Test::More tests => 4;
5use lib 't/lib';
6
7BEGIN {
8
9#line 1
10#!/usr/bin/perl -d:_NC_TEST_DashD
11#line 12
12
13}
14
15{
16 package Foo;
17
18 BEGIN { *baz = sub { 42 } }
19 sub foo { 22 }
20
21 use namespace::clean;
22
23 sub bar {
24 ::is(baz(), 42);
25 ::is(foo(), 22);
26 }
27}
28
29ok( !Foo->can("foo"), "foo cleaned up" );
30ok( !Foo->can("baz"), "baz cleaned up" );
31
32Foo->bar();