This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
warning on v-string in use/require
authorJohn Peacock <jpeacock@rowman.com>
Mon, 24 Sep 2001 17:29:03 +0000 (13:29 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 25 Sep 2001 17:20:38 +0000 (17:20 +0000)
Message-ID: <3BAFA59F.9C0E0339@rowman.com>

p4raw-id: //depot/perl@12205

ext/IO/lib/IO/Socket.pm
pp_ctl.c
t/lib/warnings/pp_ctl

index afe8b27..b62e7b3 100644 (file)
@@ -6,7 +6,7 @@
 
 package IO::Socket;
 
-require v5.6;
+require 5.006;
 
 use IO::Handle;
 use Socket 1.3;
index d488b7c..2c7bde3 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3061,6 +3061,9 @@ PP(pp_require)
                    "v%d.%d.%d, stopped", rev, ver, sver, PERL_REVISION,
                    PERL_VERSION, PERL_SUBVERSION);
            }
+           if (ckWARN(WARN_PORTABLE))
+               Perl_warner(aTHX_ WARN_PORTABLE,
+                        "v-string in use/require non-portable");
            RETPUSHYES;
        }
        else if (!SvPOKp(sv)) {                 /* require 5.005_03 */
index ac01f27..59ced2b 100644 (file)
@@ -222,6 +222,18 @@ EXPECT
 Use of uninitialized value in print at (eval 1) line 1.
 ########
 # pp_ctl.c
+use warnings 'portable';
+eval 'use 5.6.1';
+EXPECT
+v-string in use/require non-portable at (eval 1) line 2.
+########
+# pp_ctl.c
+use warnings 'portable';
+eval 'use v5.6.1';
+EXPECT
+v-string in use/require non-portable at (eval 1) line 2.
+########
+# pp_ctl.c
 use warnings;
 {
     no warnings;