What is here the recommended way the get rid of the "v-string in use/require non-portable" warning?

StackOverflow https://stackoverflow.com/questions/20765781

문제

A module requires at least Perl 5.10.0.

When I use this module with Perl version 5.10.0 I get the warning:

v-string in use/require non-portable at ... (line of "use 5.10.0;").

In Perl 5.10.1 this warning is removed.

What would be the recommended way to avoid the warning:

- change all "use 5.10.0" in the distro to "use 5.010_000;"

- add "no warnings 'portable';" to the module

- leave it to the user of Perl 5.10.0 to add "no warnings 'portable';"

- Increase the smallest required version to 5.10.1. 

perl -wE 'use 5.10.0; say $^V'
# v-string in use/require non-portable at -e line 1.
# v5.10.0
도움이 되었습니까?

해결책

If you want anything from 5.10.0 and later, you don't need to specify a minor version:

use v5.10;

You might consider using at least 5.10.1, which had some significant changes to the earlier minor version (including fixing your warning):

use v5.10.1;

But, give us a sample program, show use which Perl you're using and all that other stuff.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top