File: relative-fail.t

package info (click to toggle)
librelative-perl 0.04-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 140 kB
  • sloc: perl: 243; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 325 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!perl -Tw
package BigApp::Report;
use strict;
use Test::More;
use lib "t";

plan tests => 2;

use_ok( "relative" );

# check that loading a non-existing module results in failure
my $module = "NoSuchModule";
eval { import relative $module };
like( $@, "/Can't locate BigApp/Report/$module.pm in \@INC/", "checking error" );