File: 04_autoclean.t

package info (click to toggle)
libunconstant-perl 0.09-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 132 kB
  • sloc: perl: 224; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 397 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use Test::More tests => 2;

SKIP: {
	eval { require namespace::autoclean };
	skip "namespace::autoclean not installed", 2 if $@;

	package Foo {
		use unconstant;
		use constant FOO => 42;
	}

	package Bar {
		namespace::autoclean->import();
		use unconstant;
		use constant FOO => 42;
	}

	is ( Foo::FOO, 42, "Without namespace::autoclean" );
	is ( Bar::FOO, 42, "With namespace::autoclean" );
}