mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
In Perl 5.36 we made this a deprecation warning, due to be removed in 5.40. Now it is being removed. This removal means that the three shadow hints bits used to implement implicit vs explicit strict hints can be reclaimed at a later date, for use in other features.
25 lines
628 B
Perl
25 lines
628 B
Perl
#!./perl
|
|
|
|
chdir 't' if -d 't';
|
|
@INC = ( '.', '../lib' );
|
|
|
|
our $local_tests = 5;
|
|
require "../t/lib/common.pl";
|
|
|
|
eval qq(use strict 'garbage');
|
|
like($@, qr/^Unknown 'strict' tag\(s\) 'garbage'/);
|
|
|
|
eval qq(no strict 'garbage');
|
|
like($@, qr/^Unknown 'strict' tag\(s\) 'garbage'/);
|
|
|
|
eval qq(use strict qw(foo bar));
|
|
like($@, qr/^Unknown 'strict' tag\(s\) 'foo bar'/);
|
|
|
|
eval qq(no strict qw(foo bar));
|
|
like($@, qr/^Unknown 'strict' tag\(s\) 'foo bar'/);
|
|
|
|
eval 'use strict; use v5.10; ${"c"}';
|
|
like($@,
|
|
qr/^Can't use string \("c"\) as a SCALAR ref while "strict refs" in use/,
|
|
"use v5.10 doesn't disable explicit strict ref");
|