The pragma use feature 'unicode_strings'
is now strongly recommended.
How does one follow that recommendation in a library module that may be used by Perl versions older than v5.12? I tried several variations of
use if $PERL_VERSION >= v5.12, "feature 'unicode_strings'";
and I always get an error like
Can't locate feature 'unicode_strings'.pm in @INC.
The 'feature' pragma is listed in perlmodlib as a standard pragma, so I assume that it works with use if
and that I simply don't have the correct syntax.
The documentation for the if
module says
use if CONDITION, "MODULE", ARGUMENTS;
so
use if $] >= 5.012, "feature", "unicode_strings";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With