This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
As in bin/mlint, use Getopt::Std::getopts() instead of Perl 4 getopts.pl.
authorJames E Keenan <jkeenan@cpan.org>
Sat, 14 Oct 2017 08:22:13 +0000 (10:22 +0200)
committerH.Merijn Brand - Tux <h.m.brand@xs4all.nl>
Tue, 17 Oct 2017 13:55:30 +0000 (15:55 +0200)
For:  https://github.com/perl5-metaconfig/metaconfig/issues/14

bin/mconfig

index d554b76..51dbf5f 100755 (executable)
@@ -4,6 +4,7 @@ use sort "stable";
 BEGIN { $ENV{LC_ALL} = "C"; }
 
 use FindBin;
 BEGIN { $ENV{LC_ALL} = "C"; }
 
 use FindBin;
+use Getopt::Std;
 
 $p5_metaconfig_base = "$FindBin::Bin/../";
 chdir "$p5_metaconfig_base/perl" or
 
 $p5_metaconfig_base = "$FindBin::Bin/../";
 chdir "$p5_metaconfig_base/perl" or
@@ -56,8 +57,7 @@ $patchlevel = '0';
 $grep = '/usr/bin/grep';
 chop($date = `date`);
 &profile;                                              # Read ~/.dist_profile
 $grep = '/usr/bin/grep';
 chop($date = `date`);
 &profile;                                              # Read ~/.dist_profile
-require 'getopts.pl';
-&usage unless &Getopts("dhkmoOstvwGMVL:");
+&usage unless getopts("dhkmoOstvwGMVL:");
 
 $MC = $opt_L if $opt_L;                        # May override public library path
 $MC = &tilda_expand($MC);              # ~name expansion
 
 $MC = $opt_L if $opt_L;                        # May override public library path
 $MC = &tilda_expand($MC);              # ~name expansion