This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
This cleans the "Can't localize lexical variable" error.
[perl5.git] / t / op / fresh_perl_utf8.t
1 #!./perl
2
3 #This file is intentionally written in UTF-8
4
5 BEGIN {
6     chdir 't' if -d 't';
7     @INC = '../lib';
8     require './test.pl';
9 }
10
11 use utf8;
12 use strict;
13 use open qw( :utf8 :std );
14
15 {
16     local $@;
17     eval 'sub testme { my $ᨕ = "test"; { local $ᨕ = "new test"; print $ᨕ } }';
18     like( $@, qr/Can't localize lexical variable \$ᨕ at /u, q!"Can't localize lexical" error is in UTF-8! );
19 }