This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
in INSTALL, make clear -DDEBUGGING is much slower
[perl5.git] / regen / feature.pl
CommitLineData
69bcf1d3
FC
1#!/usr/bin/perl
2#
3# Regenerate (overwriting only if changed):
4#
5# lib/feature.pm
f2c01b15 6# feature.h
69bcf1d3 7#
3489ea76 8# from information hardcoded into this script and from two #defines
d73d634c 9# in perl.h.
69bcf1d3
FC
10#
11# This script is normally invoked from regen.pl.
12
13BEGIN {
14 require 'regen/regen_lib.pl';
15 push @INC, './lib';
16}
17use strict ;
18
c452a42f
FC
19
20###########################################################################
21# Hand-editable data
22
c6b36e45 23# (feature name) => (internal name, used in %^H and macro names)
69bcf1d3 24my %feature = (
67bdaa9e
FC
25 say => 'say',
26 state => 'state',
27 switch => 'switch',
28 evalbytes => 'evalbytes',
3fff3427 29 array_base => 'arybase',
67bdaa9e
FC
30 current_sub => '__SUB__',
31 unicode_eval => 'unieval',
32 unicode_strings => 'unicode',
2a4315f8 33 fc => 'fc',
69bcf1d3
FC
34);
35
40e4d872
FC
36# NOTE: If a feature is ever enabled in a non-contiguous range of Perl
37# versions, any code below that uses %BundleRanges will have to
38# be changed to account.
39
69bcf1d3 40my %feature_bundle = (
3fff3427 41 default => [qw(array_base)],
69bcf1d3
FC
42 "5.9.5" => [qw(say state switch array_base)],
43 "5.10" => [qw(say state switch array_base)],
44 "5.11" => [qw(say state switch unicode_strings array_base)],
45 "5.12" => [qw(say state switch unicode_strings array_base)],
46 "5.13" => [qw(say state switch unicode_strings array_base)],
47 "5.14" => [qw(say state switch unicode_strings array_base)],
48 "5.15" => [qw(say state switch unicode_strings unicode_eval
2a4315f8 49 evalbytes current_sub fc)],
69bcf1d3 50 "5.16" => [qw(say state switch unicode_strings unicode_eval
2a4315f8 51 evalbytes current_sub fc)],
69bcf1d3
FC
52);
53
c452a42f 54
69bcf1d3 55###########################################################################
c452a42f 56# More data generated from the above
69bcf1d3 57
f2c01b15
FC
58my %UniqueBundles; # "say state switch" => 5.10
59my %Aliases; # 5.12 => 5.11
60for( sort keys %feature_bundle ) {
61 my $value = join(' ', sort @{$feature_bundle{$_}});
62 if (exists $UniqueBundles{$value}) {
63 $Aliases{$_} = $UniqueBundles{$value};
64 }
65 else {
66 $UniqueBundles{$value} = $_;
67 }
68}
40e4d872
FC
69 # start end
70my %BundleRanges; # say => ['5.10', '5.15'] # unique bundles for values
71for my $bund (
72 sort { $a eq 'default' ? -1 : $b eq 'default' ? 1 : $a cmp $b }
73 values %UniqueBundles
74) {
03222170 75 next if $bund =~ /[^\d.]/ and $bund ne 'default';
40e4d872
FC
76 for (@{$feature_bundle{$bund}}) {
77 if (@{$BundleRanges{$_} ||= []} == 2) {
78 $BundleRanges{$_}[1] = $bund
79 }
80 else {
81 push @{$BundleRanges{$_}}, $bund;
82 }
83 }
84}
69bcf1d3 85
47222a2d 86my $HintShift;
ada44f8c 87my $HintMask;
3489ea76 88my $Uni8Bit;
47222a2d
FC
89
90open "perl.h", "perl.h" or die "$0 cannot open perl.h: $!";
3489ea76
FC
91while (readline "perl.h") {
92 next unless /#\s*define\s+(HINT_FEATURE_MASK|HINT_UNI_8_BIT)/;
93 my $is_u8b = $1 =~ 8;
94 /(0x[A-Fa-f0-9]+)/ or die "No hex number in:\n\n$_\n ";
95 if ($is_u8b) {
96 $Uni8Bit = $1;
97 }
98 else {
ada44f8c 99 my $hex = $HintMask = $1;
47222a2d
FC
100 my $bits = sprintf "%b", oct $1;
101 $bits =~ /^0*1+(0*)\z/
102 or die "Non-contiguous bits in $bits (binary for $hex):\n\n$_\n ";
103 $HintShift = length $1;
104 my $bits_needed =
105 length sprintf "%b", scalar keys %UniqueBundles;
106 $bits =~ /1{$bits_needed}/
107 or die "Not enough bits (need $bits_needed)"
108 . " in $bits (binary for $hex):\n\n$_\n";
47222a2d 109 }
3489ea76 110 if ($Uni8Bit && $HintMask) { last }
47222a2d 111}
3489ea76
FC
112die "No HINT_FEATURE_MASK defined in perl.h" unless $HintMask;
113die "No HINT_UNI_8_BIT defined in perl.h" unless $Uni8Bit;
114
47222a2d
FC
115close "perl.h";
116
ada44f8c
FC
117my @HintedBundles =
118 ('default', grep !/[^\d.]/, sort values %UniqueBundles);
119
47222a2d 120
f2c01b15 121###########################################################################
c452a42f 122# Open files to be generated
f2c01b15
FC
123
124my ($pm, $h) = map {
69bcf1d3 125 open_new($_, '>', { by => 'regen/feature.pl' });
f2c01b15 126} 'lib/feature.pm', 'feature.h';
69bcf1d3
FC
127
128
c452a42f
FC
129###########################################################################
130# Generate lib/feature.pm
131
69bcf1d3
FC
132while (<DATA>) {
133 last if /^FEATURES$/ ;
134 print $pm $_ ;
135}
136
137sub longest {
138 my $long;
139 for(@_) {
140 if (!defined $long or length $long < length) {
141 $long = $_;
142 }
143 }
144 $long;
145}
146
0bb01b05 147print $pm "our %feature = (\n";
69bcf1d3
FC
148my $width = length longest keys %feature;
149for(sort { length $a <=> length $b } keys %feature) {
67bdaa9e
FC
150 print $pm " $_" . " "x($width-length)
151 . " => 'feature_$feature{$_}',\n";
69bcf1d3
FC
152}
153print $pm ");\n\n";
154
69bcf1d3 155print $pm "our %feature_bundle = (\n";
88da30d7
FC
156$width = length longest values %UniqueBundles;
157for( sort { $UniqueBundles{$a} cmp $UniqueBundles{$b} }
158 keys %UniqueBundles ) {
159 my $bund = $UniqueBundles{$_};
160 print $pm qq' "$bund"' . " "x($width-length $bund)
161 . qq' => [qw($_)],\n';
69bcf1d3
FC
162}
163print $pm ");\n\n";
164
88da30d7
FC
165for (sort keys %Aliases) {
166 print $pm
167 qq'\$feature_bundle{"$_"} = \$feature_bundle{"$Aliases{$_}"};\n';
168};
69bcf1d3 169
ada44f8c
FC
170print $pm <<EOPM;
171
0bb01b05
FC
172our \$hint_shift = $HintShift;
173our \$hint_mask = $HintMask;
174our \@hint_bundles = qw( @HintedBundles );
3489ea76
FC
175
176# This gets set (for now) in \$^H as well as in %^H,
177# for runtime speed of the uc/lc/ucfirst/lcfirst functions.
178# See HINT_UNI_8_BIT in perl.h.
179our \$hint_uni8bit = $Uni8Bit;
ada44f8c
FC
180EOPM
181
69bcf1d3
FC
182
183while (<DATA>) {
2b3fe414
FC
184 last if /^PODTURES$/ ;
185 print $pm $_ ;
186}
187
188select +(select($pm), $~ = 'PODTURES')[0];
189format PODTURES =
190 ^<<<<<<<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
191$::bundle, $::feature
192.
193
194for ('default', sort grep /\.\d[02468]/, keys %feature_bundle) {
195 $::bundle = ":$_";
196 $::feature = join ' ', @{$feature_bundle{$_}};
197 write $pm;
198 print $pm "\n";
199}
200
201while (<DATA>) {
69bcf1d3
FC
202 print $pm $_ ;
203}
204
205read_only_bottom_close_and_rename($pm);
206
c452a42f
FC
207
208###########################################################################
209# Generate feature.h
210
f2c01b15
FC
211print $h <<EOH;
212
213#if defined(PERL_CORE) || defined (PERL_EXT)
214
215#define HINT_FEATURE_SHIFT $HintShift
216
f2c01b15
FC
217EOH
218
219my $count;
016d11cb
FC
220for (@HintedBundles) {
221 (my $key = uc) =~ y/.//d;
222 print $h "#define FEATURE_BUNDLE_$key ", $count++, "\n";
f2c01b15
FC
223}
224
7d058bc9 225print $h <<'EOH';
2b9e0ab7 226#define FEATURE_BUNDLE_CUSTOM (HINT_FEATURE_MASK >> HINT_FEATURE_SHIFT)
f2c01b15 227
7d058bc9 228#define CURRENT_HINTS \
d1fd0100 229 (PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints)
035b6821
FC
230#define CURRENT_FEATURE_BUNDLE \
231 ((CURRENT_HINTS & HINT_FEATURE_MASK) >> HINT_FEATURE_SHIFT)
d1fd0100 232
7d058bc9 233#define FEATURE_IS_ENABLED(name) \
ef744b29 234 ((CURRENT_HINTS \
7d058bc9
FC
235 & HINT_LOCALIZE_HH) \
236 && Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)))
237/* The longest string we pass in. */
03222170
FC
238EOH
239
1b6e8741
FC
240my $longest_internal_feature_name = longest values %feature;
241print $h <<EOL;
242#define MAX_FEATURE_LEN (sizeof("$longest_internal_feature_name")-1)
243
244EOL
245
03222170 246for (
3fff3427 247 sort { length $a <=> length $b } keys %feature
03222170
FC
248) {
249 my($first,$last) =
250 map { (my $__ = uc) =~ y/.//d; $__ } @{$BundleRanges{$_}};
3fff3427 251 my $name = $feature{$_};
03222170 252 my $NAME = uc $name;
beda0318
FC
253 if ($last && $first eq 'DEFAULT') { # ‘>= DEFAULT’ warns
254 print $h <<EOI;
255#define FEATURE_$NAME\_IS_ENABLED \\
256 ( \\
257 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_$last \\
258 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
3fff3427 259 FEATURE_IS_ENABLED("$name")) \\
beda0318
FC
260 )
261
262EOI
263 }
264 elsif ($last) {
03222170
FC
265 print $h <<EOH3;
266#define FEATURE_$NAME\_IS_ENABLED \\
267 ( \\
268 (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_$first && \\
269 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_$last) \\
270 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
3fff3427 271 FEATURE_IS_ENABLED("$name")) \\
03222170
FC
272 )
273
274EOH3
275 }
276 else {
277 print $h <<EOH4;
278#define FEATURE_$NAME\_IS_ENABLED \\
279 ( \\
280 CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_$first \\
281 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
3fff3427 282 FEATURE_IS_ENABLED("$name")) \\
03222170
FC
283 )
284
285EOH4
286 }
287}
288
289print $h <<EOH;
290
f2c01b15 291#endif /* PERL_CORE or PERL_EXT */
4160ddbd
FC
292
293#ifdef PERL_IN_OP_C
294PERL_STATIC_INLINE void
295S_enable_feature_bundle(pTHX_ SV *ver)
296{
297 SV *comp_ver = sv_newmortal();
298 PL_hints = (PL_hints &~ HINT_FEATURE_MASK)
299 | (
f2c01b15
FC
300EOH
301
4160ddbd
FC
302for (reverse @HintedBundles[1..$#HintedBundles]) { # skip default
303 my $numver = $_;
304 if ($numver eq '5.10') { $numver = '5.009005' } # special case
305 else { $numver =~ s/\./.0/ } # 5.11 => 5.011
306 (my $macrover = $_) =~ y/.//d;
307 print $h <<" EOK";
308 (sv_setnv(comp_ver, $numver),
309 vcmp(ver, upg_version(comp_ver, FALSE)) >= 0)
310 ? FEATURE_BUNDLE_$macrover :
311 EOK
312}
313
314print $h <<EOJ;
315 FEATURE_BUNDLE_DEFAULT
316 ) << HINT_FEATURE_SHIFT;
6389c777
FC
317 /* special case */
318 assert(PL_curcop == &PL_compiling);
319 if (FEATURE_UNICODE_IS_ENABLED) PL_hints |= HINT_UNI_8_BIT;
320 else PL_hints &= ~HINT_UNI_8_BIT;
4160ddbd
FC
321}
322#endif /* PERL_IN_OP_C */
323EOJ
324
f2c01b15
FC
325read_only_bottom_close_and_rename($h);
326
c452a42f
FC
327
328###########################################################################
329# Template for feature.pm
330
69bcf1d3
FC
331__END__
332package feature;
333
2a4315f8 334our $VERSION = '1.26';
69bcf1d3
FC
335
336FEATURES
337
69bcf1d3
FC
338# TODO:
339# - think about versioned features (use feature switch => 2)
340
341=head1 NAME
342
343feature - Perl pragma to enable new features
344
345=head1 SYNOPSIS
346
347 use feature qw(say switch);
348 given ($foo) {
349 when (1) { say "\$foo == 1" }
350 when ([2,3]) { say "\$foo == 2 || \$foo == 3" }
351 when (/^a[bc]d$/) { say "\$foo eq 'abd' || \$foo eq 'acd'" }
352 when ($_ > 100) { say "\$foo > 100" }
353 default { say "None of the above" }
354 }
355
356 use feature ':5.10'; # loads all features available in perl 5.10
357
358 use v5.10; # implicitly loads :5.10 feature bundle
359
360=head1 DESCRIPTION
361
362It is usually impossible to add new syntax to Perl without breaking
363some existing programs. This pragma provides a way to minimize that
364risk. New syntactic constructs, or new semantic meanings to older
365constructs, can be enabled by C<use feature 'foo'>, and will be parsed
366only when the appropriate feature pragma is in scope. (Nevertheless, the
367C<CORE::> prefix provides access to all Perl keywords, regardless of this
368pragma.)
369
370=head2 Lexical effect
371
372Like other pragmas (C<use strict>, for example), features have a lexical
373effect. C<use feature qw(foo)> will only make the feature "foo" available
374from that point to the end of the enclosing block.
375
376 {
377 use feature 'say';
378 say "say is available here";
379 }
380 print "But not here.\n";
381
382=head2 C<no feature>
383
384Features can also be turned off by using C<no feature "foo">. This too
385has lexical effect.
386
387 use feature 'say';
388 say "say is available here";
389 {
390 no feature 'say';
391 print "But not here.\n";
392 }
393 say "Yet it is here.";
394
395C<no feature> with no features specified will turn off all features.
396
397=head1 AVAILABLE FEATURES
398
399=head2 The 'say' feature
400
401C<use feature 'say'> tells the compiler to enable the Perl 6 style
402C<say> function.
403
404See L<perlfunc/say> for details.
405
406This feature is available starting with Perl 5.10.
407
408=head2 The 'state' feature
409
410C<use feature 'state'> tells the compiler to enable C<state>
411variables.
412
413See L<perlsub/"Persistent Private Variables"> for details.
414
415This feature is available starting with Perl 5.10.
416
417=head2 The 'switch' feature
418
419C<use feature 'switch'> tells the compiler to enable the Perl 6
420given/when construct.
421
48238296 422See L<perlsyn/"Switch Statements"> for details.
69bcf1d3
FC
423
424This feature is available starting with Perl 5.10.
425
426=head2 The 'unicode_strings' feature
427
428C<use feature 'unicode_strings'> tells the compiler to use Unicode semantics
429in all string operations executed within its scope (unless they are also
430within the scope of either C<use locale> or C<use bytes>). The same applies
431to all regular expressions compiled within the scope, even if executed outside
432it.
433
434C<no feature 'unicode_strings'> tells the compiler to use the traditional
435Perl semantics wherein the native character set semantics is used unless it is
436clear to Perl that Unicode is desired. This can lead to some surprises
437when the behavior suddenly changes. (See
438L<perlunicode/The "Unicode Bug"> for details.) For this reason, if you are
439potentially using Unicode in your program, the
440C<use feature 'unicode_strings'> subpragma is B<strongly> recommended.
441
442This feature is available starting with Perl 5.12, but was not fully
443implemented until Perl 5.14.
444
445=head2 The 'unicode_eval' and 'evalbytes' features
446
447Under the C<unicode_eval> feature, Perl's C<eval> function, when passed a
448string, will evaluate it as a string of characters, ignoring any
449C<use utf8> declarations. C<use utf8> exists to declare the encoding of
450the script, which only makes sense for a stream of bytes, not a string of
451characters. Source filters are forbidden, as they also really only make
452sense on strings of bytes. Any attempt to activate a source filter will
453result in an error.
454
455The C<evalbytes> feature enables the C<evalbytes> keyword, which evaluates
456the argument passed to it as a string of bytes. It dies if the string
457contains any characters outside the 8-bit range. Source filters work
458within C<evalbytes>: they apply to the contents of the string being
459evaluated.
460
461Together, these two features are intended to replace the historical C<eval>
462function, which has (at least) two bugs in it, that cannot easily be fixed
463without breaking existing programs:
464
465=over
466
467=item *
468
469C<eval> behaves differently depending on the internal encoding of the
470string, sometimes treating its argument as a string of bytes, and sometimes
471as a string of characters.
472
473=item *
474
475Source filters activated within C<eval> leak out into whichever I<file>
476scope is currently being compiled. To give an example with the CPAN module
477L<Semi::Semicolons>:
478
479 BEGIN { eval "use Semi::Semicolons; # not filtered here " }
480 # filtered here!
481
482C<evalbytes> fixes that to work the way one would expect:
483
484 use feature "evalbytes";
485 BEGIN { evalbytes "use Semi::Semicolons; # filtered " }
486 # not filtered
487
488=back
489
490These two features are available starting with Perl 5.16.
491
492=head2 The 'current_sub' feature
493
494This provides the C<__SUB__> token that returns a reference to the current
495subroutine or C<undef> outside of a subroutine.
496
497This feature is available starting with Perl 5.16.
498
499=head2 The 'array_base' feature
500
501This feature supports the legacy C<$[> variable. See L<perlvar/$[> and
502L<arybase>. It is on by default but disabled under C<use v5.16> (see
503L</IMPLICIT LOADING>, below).
504
505This feature is available under this name starting with Perl 5.16. In
506previous versions, it was simply on all the time, and this pragma knew
507nothing about it.
508
2a4315f8
BF
509=head2 The 'fc' feature
510
511C<use feature 'fc'> tells the compiler to enable the C<fc> function,
512which implements Unicode casefolding.
513
514See L<perlfunc/fc> for details.
515
516This feature is available from Perl 5.16 onwards.
517
69bcf1d3
FC
518=head1 FEATURE BUNDLES
519
520It's possible to load multiple features together, using
521a I<feature bundle>. The name of a feature bundle is prefixed with
522a colon, to distinguish it from an actual feature.
523
524 use feature ":5.10";
525
526The following feature bundles are available:
527
528 bundle features included
529 --------- -----------------
2b3fe414 530PODTURES
69bcf1d3
FC
531The C<:default> bundle represents the feature set that is enabled before
532any C<use feature> or C<no feature> declaration.
533
534Specifying sub-versions such as the C<0> in C<5.14.0> in feature bundles has
535no effect. Feature bundles are guaranteed to be the same for all sub-versions.
536
537 use feature ":5.14.0"; # same as ":5.14"
538 use feature ":5.14.1"; # same as ":5.14"
539
540=head1 IMPLICIT LOADING
541
542Instead of loading feature bundles by name, it is easier to let Perl do
543implicit loading of a feature bundle for you.
544
545There are two ways to load the C<feature> pragma implicitly:
546
547=over 4
548
549=item *
550
551By using the C<-E> switch on the Perl command-line instead of C<-e>.
552That will enable the feature bundle for that version of Perl in the
553main compilation unit (that is, the one-liner that follows C<-E>).
554
555=item *
556
557By explicitly requiring a minimum Perl version number for your program, with
558the C<use VERSION> construct. That is,
559
560 use v5.10.0;
561
562will do an implicit
563
564 no feature;
565 use feature ':5.10';
566
567and so on. Note how the trailing sub-version
568is automatically stripped from the
569version.
570
571But to avoid portability warnings (see L<perlfunc/use>), you may prefer:
572
573 use 5.010;
574
575with the same effect.
576
577If the required version is older than Perl 5.10, the ":default" feature
578bundle is automatically loaded instead.
579
580=back
581
582=cut
583
9c1e3432
FC
584sub current_bundle {
585 my $bundle_number = $^H & $hint_mask;
586 return if $bundle_number == $hint_mask;
587 return $feature_bundle{@hint_bundles[$bundle_number >> $hint_shift]};
588}
589
83141fdc
FC
590sub normalise_hints {
591 # Delete any keys that may be left over from last time.
592 delete @^H{ values(%feature) };
593 $^H |= $hint_mask;
594 for (@{+shift}) {
595 $^H{$feature{$_}} = 1;
596 $^H |= $hint_uni8bit if $_ eq 'unicode_strings';
597 }
598}
599
69bcf1d3
FC
600sub import {
601 my $class = shift;
602 if (@_ == 0) {
603 croak("No features specified");
604 }
1e0dc09f 605 if (my $features = current_bundle) {
6634bb9d 606 # Features are enabled implicitly via bundle hints.
83141fdc 607 normalise_hints $features;
1e0dc09f 608 }
69bcf1d3
FC
609 while (@_) {
610 my $name = shift(@_);
611 if (substr($name, 0, 1) eq ":") {
612 my $v = substr($name, 1);
613 if (!exists $feature_bundle{$v}) {
614 $v =~ s/^([0-9]+)\.([0-9]+).[0-9]+$/$1.$2/;
615 if (!exists $feature_bundle{$v}) {
616 unknown_feature_bundle(substr($name, 1));
617 }
618 }
619 unshift @_, @{$feature_bundle{$v}};
620 next;
621 }
622 if (!exists $feature{$name}) {
69bcf1d3 623 unknown_feature($name);
69bcf1d3
FC
624 }
625 $^H{$feature{$name}} = 1;
626 $^H |= $hint_uni8bit if $name eq 'unicode_strings';
627 }
628}
629
630sub unimport {
631 my $class = shift;
632
1e0dc09f 633 if (my $features = current_bundle) {
83141fdc
FC
634 # Features are enabled implicitly via bundle hints.
635 normalise_hints $features;
1e0dc09f
FC
636 }
637
69bcf1d3
FC
638 # A bare C<no feature> should disable *all* features
639 if (!@_) {
640 delete @^H{ values(%feature) };
641 $^H &= ~ $hint_uni8bit;
69bcf1d3
FC
642 return;
643 }
644
645 while (@_) {
646 my $name = shift;
647 if (substr($name, 0, 1) eq ":") {
648 my $v = substr($name, 1);
649 if (!exists $feature_bundle{$v}) {
650 $v =~ s/^([0-9]+)\.([0-9]+).[0-9]+$/$1.$2/;
651 if (!exists $feature_bundle{$v}) {
652 unknown_feature_bundle(substr($name, 1));
653 }
654 }
655 unshift @_, @{$feature_bundle{$v}};
656 next;
657 }
658 if (!exists($feature{$name})) {
69bcf1d3 659 unknown_feature($name);
69bcf1d3
FC
660 }
661 else {
662 delete $^H{$feature{$name}};
663 $^H &= ~ $hint_uni8bit if $name eq 'unicode_strings';
664 }
665 }
666}
667
668sub unknown_feature {
669 my $feature = shift;
670 croak(sprintf('Feature "%s" is not supported by Perl %vd',
671 $feature, $^V));
672}
673
674sub unknown_feature_bundle {
675 my $feature = shift;
676 croak(sprintf('Feature bundle "%s" is not supported by Perl %vd',
677 $feature, $^V));
678}
679
680sub croak {
681 require Carp;
682 Carp::croak(@_);
683}
684
6851;