Skip to content

Commit 1af8c25

Browse files
sciuriusjkeenan
authored andcommitted
cpan/Getopt-Long - Update to version 2.58
Changes in version 2.58 ----------------------- * Be more precise about numeric errors (issue #26). * Add strict to G::L::Parser. * Doc enhancements, thanks to Elvin Aslanov. * Silence unnecessary test diagnostics (issue Perl#29).
1 parent c79fe2b commit 1af8c25

File tree

5 files changed

+30
-24
lines changed

5 files changed

+30
-24
lines changed

Porting/Maintainers.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,8 @@ package Maintainers;
610610
},
611611

612612
'Getopt::Long' => {
613-
'DISTRIBUTION' => 'JV/Getopt-Long-2.57.tar.gz',
613+
'DISTRIBUTION' => 'JV/Getopt-Long-2.58.tar.gz',
614+
'SYNCINFO' => 'jkeenan on Wed Jun 12 08:25:08 2024',
614615
'SYNCINFO' => 'jkeenan on Sat Nov 11 13:09:21 2023',
615616
'FILES' => q[cpan/Getopt-Long],
616617
'EXCLUDED' => [

cpan/Getopt-Long/lib/Getopt/Long.pm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Getopt::Long.pm -- Universal options parsing
44
# Author : Johan Vromans
55
# Created On : Tue Sep 11 15:00:12 1990
6-
# Last Modified On: Sat Nov 11 17:48:41 2023
7-
# Update Count : 1808
6+
# Last Modified On: Tue Jun 11 13:18:11 2024
7+
# Update Count : 1811
88
# Status : Released
99

1010
################ Module Preamble ################
@@ -17,7 +17,8 @@ use warnings;
1717

1818
package Getopt::Long;
1919

20-
our $VERSION = 2.57;
20+
# Must match Getopt::Long::Parser::VERSION!
21+
our $VERSION = 2.58;
2122

2223
use Exporter;
2324
use base qw(Exporter);
@@ -1185,7 +1186,7 @@ sub FindOption ($$$$$) {
11851186
warn ("Value \"", $arg, "\" invalid for option ",
11861187
$opt, " (",
11871188
$type eq 'o' ? "extended " : '',
1188-
"number expected)\n");
1189+
"integer number expected)\n");
11891190
$error++;
11901191
# Push back.
11911192
unshift (@$argv, $starter.$rest) if defined $rest;

cpan/Getopt-Long/lib/Getopt/Long/Parser.pm

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,44 @@
11
#! perl
22

3-
# Parser.pm -- Getopt::Long object oriented interface
3+
# Parser.pm -- Getopt::Long object-oriented interface
44
# Author : Johan Vromans
55
# Created On : Thu Nov 9 10:37:00 2023
6-
# Last Modified On: Sat Nov 11 17:48:49 2023
7-
# Update Count : 13
6+
# Last Modified On: Tue Jun 11 13:17:57 2024
7+
# Update Count : 16
88
# Status : Released
99

10+
use strict;
11+
use warnings;
12+
1013
package Getopt::Long::Parser;
1114

12-
our $VERSION = 2.57;
15+
# Must match Getopt::Long::VERSION!
16+
our $VERSION = 2.58;
1317

1418
=head1 NAME
1519
16-
Getopt::Long::Parser - Getopt::Long object oriented interface
20+
Getopt::Long::Parser - Getopt::Long object-oriented interface
1721
1822
=head1 SYNOPSIS
1923
2024
use Getopt::Long::Parser;
2125
my $p = Getopt::Long::Parser->new;
22-
$p->configure( ...configuration options... );
23-
if ( $p->getoptions( ...options descriptions... ) ) ...
24-
if ( $p->getoptionsfromarray( \@array, ...options descriptions... ) ) ...
26+
$p->configure( %options );
27+
if ( $p->getoptions( @options ) ) { ... }
28+
if ( $p->getoptionsfromarray( \@array, @options ) ) { ... }
2529
2630
Configuration options can be passed to the constructor:
2731
28-
my $p = Getopt::Long::Parser->new
29-
config => [...configuration options...];
32+
my $p = Getopt::Long::Parser->new( config => [ %options ] );
3033
3134
=head1 DESCRIPTION
3235
33-
Getopt::Long::Parser is an object oriented interface to
36+
C<Getopt::Long::Parser> is an object-oriented interface to
3437
L<Getopt::Long>. See its documentation for configuration and use.
3538
36-
Note that Getopt::Long and Getopt::Long::Parser are not object
37-
oriented. Getopt::Long::Parser emulates an object oriented interface,
39+
Note that C<Getopt::Long> and C<Getopt::Long::Parser> are not
40+
object-oriented.
41+
C<Getopt::Long::Parser> emulates an object-oriented interface,
3842
which should be okay for most purposes.
3943
4044
=head1 CONSTRUCTOR
@@ -93,7 +97,7 @@ use warnings 'redefine';
9397

9498
=head1 METHODS
9599
96-
In the examples, $p is assumed to be the result of a call to the constructor.
100+
In the examples, C<$p> is assumed to be the result of a call to the constructor.
97101
98102
=head2 configure
99103
@@ -116,13 +120,13 @@ sub configure {
116120

117121
=head2 getoptionsfromarray
118122
119-
$res = $p->getoptionsfromarray( $aref, @opts );
123+
my $res = $p->getoptionsfromarray( $aref, @opts );
120124
121125
=head2 getoptions
122126
123-
$res = $p->getoptions( @opts );
127+
my $res = $p->getoptions( @opts );
124128
125-
The same as getoptionsfromarray( \@ARGV, @opts ).
129+
The same as C<getoptionsfromarray( \@ARGV, @opts )>.
126130
127131
=cut
128132

cpan/Getopt-Long/t/gol-load1.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ ok( defined $Getopt::Long::Parser::VERSION,
3434
is( $Getopt::Long::VERSION, $Getopt::Long::Parser::VERSION,
3535
"Parser version matches" );
3636

37-
diag( "Testing Getopt::Long $Getopt::Long::VERSION, Perl $], $^X" );
37+
note( "Testing Getopt::Long $Getopt::Long::VERSION, Perl $], $^X" );

cpan/Getopt-Long/t/gol-oo.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ die("Getopt::Long version $want_version required--this is only version ".
1717
print "1..14\n";
1818

1919
@ARGV = qw(-Foo -baR --foo bar);
20-
my $p = new Getopt::Long::Parser (config => ["no_ignore_case"]);
20+
my $p = Getopt::Long::Parser->new(config => ["no_ignore_case"]);
2121
undef $opt_baR;
2222
undef $opt_bar;
2323
print "ok 1\n" if $p->getoptions ("foo", "Foo=s");

0 commit comments

Comments
 (0)