FILE: C:\Program Files (x86)\Plesk\perl\lib\stable.pm
--
package stable;
$stable::VERSION = '0.033';
use strict;
use warnings;
use version ();
use experimental ();
use Carp qw/croak carp/;
my %allow_at = (
bitwise => 5.022000,
isa => 5.032000,
lexical_subs => 5.022000,
postderef => 5.020000,
const_attr => 5.022000,
for_list => 5.036000,
);
sub import {
my ($self, @pragmas) = @_;
for my $pragma (@pragmas) {
my $min_ver = $allow_at{$pragma};
croak "unknown stablized experiment $pragma" unless defined $min_ver;
croak "requested stablized experiment $pragma, which is stable at $min_ver but this is $]"
unless $] >= $min_ver;
}
experimental->import(@pragmas);
return;
}
sub unimport {
my ($self, @pragmas) = @_;
# Look, we could say "You can't unimport stable experiment 'bitwise' on
# 5.20" but it just seems weird. -- rjbs, 2022-03-05
experimental->unimport(@pragmas);
return;
}
1;
#ABSTRACT: Experimental features made easy, once we know they're stable
__END__
=pod
=encoding UTF-8
=head1 NAME
stable - Experimental features made easy, once we know they're stable
=head1 VERSION
version 0.032
=head1 SYNOPSIS
use stable 'lexical_subs', 'bitwise';
my sub is_odd($value) { $value & 1 }
=head1 DESCRIPTION
The L pragma makes it easy to turn on experiments while turning
off associated warnings. You should read about it, if you don't already know
what it does.
Seeing C