File: import_strict_and_warnings.t

package info (click to toggle)
libtest-most-perl 0.38-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 192 kB
  • sloc: perl: 543; makefile: 2
file content (8 lines) | stat: -rw-r--r-- 242 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
use lib 'lib';

use Test::Most tests => 2;

eval '$foo = 1';
ok my $error = $@, 'evaling an undeclared variable should fail';
like $error, qr/Global symbol.*requires explicit package name/,
    '... and give us an appropriate error message';