This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use Getopt::Std::getopts() as it comes with all Perl 5 versions.
authorJames E Keenan <jkeenan@cpan.org>
Fri, 13 Oct 2017 14:02:31 +0000 (16:02 +0200)
committerH.Merijn Brand - Tux <h.m.brand@xs4all.nl>
Tue, 17 Oct 2017 13:55:30 +0000 (15:55 +0200)
Instead of Perl 4 getopts.pl.

For:  https://github.com/perl5-metaconfig/metaconfig/issues/14

bin/mlint

index 8411f12..bc4cce6 100755 (executable)
--- a/bin/mlint
+++ b/bin/mlint
@@ -3,6 +3,7 @@
 BEGIN { $ENV{LC_ALL} = "C"; }
 
 use FindBin;
+use Getopt::Std;
 
 $p5_metaconfig_base = "$FindBin::Bin/../";
 chdir "$p5_metaconfig_base/perl" ||
@@ -44,8 +45,7 @@ $version = '3.5';
 $patchlevel = '0';
 $grep = '/usr/bin/grep';
 &profile;                                              # Read ~/.dist_profile
-require 'getopts.pl';
-&usage unless &Getopts("hklVL:oOs");
+&usage unless getopts("hklVL:oOs");
 
 if ($opt_V) {
        print STDERR "metalint $version PL$patchlevel\n";