File: also.t

package info (click to toggle)
libnamespace-autoclean-perl 0.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 520 kB
  • sloc: perl: 580; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use Test::More 0.88;

{
    package Foo;
    use namespace::autoclean -also => ['bar'];
    use namespace::autoclean -also => 'moo';
    sub bar {}
    sub moo {}
    sub baz {}
}

ok(!Foo->can('bar'), '-also works');
ok(!Foo->can('moo'), '-also works with string argument');
ok( Foo->can('baz'), 'method not specified in -also remains');

done_testing();