~ubuntu-branches/ubuntu/saucy/libnamespace-clean-perl/saucy

« back to all changes in this revision

Viewing changes to t/author-07-debugger.t

  • Committer: Bazaar Package Importer
  • Author(s): Ansgar Burchardt
  • Date: 2011-08-05 11:12:15 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110805111215-3mvgb4b3dbdgp0tt
Tags: 0.21-1
* New upstream release.
* Remove patch fix-pod-spelling.patch (applied upstream).
* Add NAME section to POD documentation.
  + new patch: pod-whatis.diff
* Remove (build-)dep on libsub-name-perl, libsub-identify-perl (>= 0.04).
* Bump (build-)dep on libpackage-stash-perl to >= 0.23.
* debian/control: Convert Vcs-* fields to Git.
* Bump Standards-Version to 3.9.2 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
BEGIN {
3
 
  unless ($ENV{AUTHOR_TESTING}) {
4
 
    require Test::More;
5
 
    Test::More::plan(skip_all => 'these tests are for testing by the author');
6
 
  }
7
 
}
8
 
 
9
 
use Test::More;
10
 
 
11
 
BEGIN {
12
 
    plan skip_all => 'Only applicable on perl >= 5.8.9'
13
 
        if $] <= 5.008008;
14
 
 
15
 
#line 1
16
 
#!/usr/bin/perl -d
17
 
#line 10
18
 
 
19
 
    push @DB::typeahead, "c", "q";
20
 
 
21
 
    # try to shut it up at least a little bit
22
 
    open my $out, ">", \my $out_buf;
23
 
    $DB::OUT = $out;
24
 
    open my $in, "<", \my $in_buf;
25
 
    $DB::IN = $in;
26
 
}
27
 
 
28
 
{
29
 
    package Foo;
30
 
 
31
 
    BEGIN { *baz = sub { 42 } }
32
 
    sub foo { 22 }
33
 
 
34
 
    use namespace::clean;
35
 
 
36
 
    sub bar {
37
 
        ::is(baz(), 42);
38
 
        ::is(foo(), 22);
39
 
    }
40
 
}
41
 
 
42
 
ok( !Foo->can("foo"), "foo cleaned up" );
43
 
ok( !Foo->can("baz"), "baz cleaned up" );
44
 
 
45
 
Foo->bar();
46
 
 
47
 
done_testing;