File: 003user.t

package info (click to toggle)
libdevel-hide-perl 0.0015-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 152 kB
  • sloc: perl: 211; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

use strict;
use warnings;
use Test::More tests => 5;

use_ok('lib', 't');

# this script tests setting @HIDDEN before using Devel::Hide

{
no warnings 'once'; # @HIDDEN is used by Devel::Hide
@Devel::Hide::HIDDEN = qw(Q.pm R);
}

use_ok('Devel::Hide');

eval { require P }; 
ok(!$@, "P was loaded (as it should)");

eval { require Q }; 
like($@, qr/^Can't locate Q\.pm/, "Q not found (as it should)");

eval { require R }; 
like($@, qr/^Can't locate R\.pm/, "R not found (as it should)");