[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Regarding Bug #267505 Prototype mismatch: sub main::getopt: ...



Hello,

today I had the same bug on my testing system.

I tracked this down and found the following patch that works with
testing (perl-5.8):

--- /usr/bin/dpkg-scansources.orig      2004-10-24 20:15:07.000000000 +0200
+++ /usr/bin/dpkg-scansources   2004-10-24 20:15:12.000000000 +0200
@@ -110,7 +110,7 @@
 # Getopt::Long has some really awful defaults.  This function loads
 # it
 # then configures it to use more sane settings.
 
-sub getopt;
+sub getopt(@);
 sub configure_getopt {
     Getopt::Long->import(2.11);
     *getopt = \&Getopt::Long::GetOptions;


This works according to 'perldoc perlsub':

       To declare subroutines:

           sub NAME;                     # A "forward" declaration.
           sub NAME(PROTO);              #  ditto, but with prototypes
           ...

This patch does not work with debian stable (on the other hand in
stable there ain't no such failure). In fact applying the patch
there provokes the failure with left and right hand changed:

Prototype mismatch: sub main::getopt (@) vs none at /usr/bin/dpkg-scansources line 115.

I assume this has to do with either the version of perl or the version
of Getopt::Long but did not have the time to track this further.

So if you choose to apply above mentioned patch, please make sure not
to apply it to dpkg-scansources in dpkg-dev/woody.

Regards,

Mathias



Reply to: