perl/lib/strict.t
Paul "LeoNerd" Evans 4210e234cb Make downgrading a use VERSION past v5.11 fatal
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.
2024-02-10 18:12:26 +00:00

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");