File: constant.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 (17 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use warnings;
use Test::More 0.88;

{
    package Foo;
    use constant CAT => 'kitten';
    BEGIN { our $DOG = 'puppy' }
    use constant DOG => 'puppy';
    use namespace::autoclean;
}

ok(Foo->can('CAT'), 'constant sub was not cleaned');
ok(Foo->can('DOG'), 'constant with existing glob entries was not cleaned');

done_testing;