Subject: | adapt Verilog::Getopt to recent releases of Getopt::Long |
Recent versions of Getopt::Long return objects - this causes failures in
the test of SystemPerl. The root cause is a
if(ref $_[0])
in Verilog::Getopt line 227, which is true for the
Getopt::Long::Callback object. It seems to work OK if we test for ref
and check whether the reference is an ARRAY. See the attached patch.
-Marek
Subject: | Verilog-Perl-patch.diff |
diff -ruN Verilog-Perl-3.210/Getopt.pm Verilog-Perl-3.210p1/Getopt.pm
--- Verilog-Perl-3.210/Getopt.pm 2009-05-19 15:28:31.000000000 +0200
+++ Verilog-Perl-3.210p1/Getopt.pm 2009-06-17 08:57:42.647063000 +0200
@@ -222,7 +222,8 @@
sub depend_files {
my $self = shift;
if (@_) {
- if (ref $_[0]) {
+ # recent versions of Getopt::Long return objects
+ if (ref($_[0]) && ref($_[0]) eq 'ARRAY') {
$self->{depend_files} = {};
foreach my $fn (@{$_[0]}) {
$self->{depend_files}{$fn} = 1;