This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deprecate the -P switch.
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 3 Sep 2007 17:11:02 +0000 (17:11 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 3 Sep 2007 17:11:02 +0000 (17:11 +0000)
p4raw-id: //depot/perl@31787

perl.c
pod/perlrun.pod

diff --git a/perl.c b/perl.c
index 6b02712..508fb56 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1787,6 +1787,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
            forbid_setid('P', -1);
            PL_preprocess = TRUE;
            s++;
+           deprecate("-P");
            goto reswitch;
        case 'S':
            forbid_setid('S', -1);
index 2d78097..43c8719 100644 (file)
@@ -699,7 +699,8 @@ the implicit loop, just as in B<awk>.
 X<-P>
 
 B<NOTE: Use of -P is strongly discouraged because of its inherent
-problems, including poor portability.>
+problems, including poor portability. It is deprecated and will be
+removed in a future version of Perl.>
 
 This option causes your program to be run through the C preprocessor before
 compilation by Perl.  Because both comments and B<cpp> directives begin