This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactoring the /Can't return (?:array|hash) to scalar context/ croak
[perl5.git] / lib / diagnostics.t
... / ...
CommitLineData
1#!./perl
2
3BEGIN {
4 if ($^O eq 'MacOS') {
5 chdir '::' if -d '::pod' && -d '::t';
6 @INC = ':lib:';
7 } else {
8 chdir '..' if -d '../pod' && -d '../t';
9 @INC = 'lib';
10 }
11}
12
13use Test::More tests => 2;
14
15BEGIN { use_ok('diagnostics') }
16
17require base;
18
19eval {
20 'base'->import(qw(I::do::not::exist));
21};
22
23like( $@, qr/^Base class package "I::do::not::exist" is empty/);