Skip Menu |

This queue is for tickets about the DBD-XBase CPAN distribution.

Report information
The Basics
Id: 29523
Status: resolved
Priority: 0/
Queue: DBD-XBase

People
Owner: JANPAZ [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.241
Fixed in: 1.01



Subject: New warnings with perl5.10.0
With perl5.10.0 there are new warnings when loading the XBase module: $ perl5.10.0 -MXBase -e1 Prototype mismatch: sub XBase::Base::O_BINARY () vs none at (eval 4) line 1. Constant subroutine O_BINARY redefined at (eval 4) line 1. I am not sure what's the best fix, but there seem to be two possibilities: * do not import anything from IO::File, i.e. write "use IO::File ()" * specify the prototype when defining the O_BINARY constant i.e. eval ' sub O_BINARY () { 0 } ' Regards, Slaven
From: dam [...] modsoftsys.com
On Thu Sep 20 18:38:58 2007, SREZIC wrote: Show quoted text
> I am not sure what's the best fix, but there seem to be two possibilities: > * do not import anything from IO::File, i.e. write "use IO::File ()" > * specify the prototype when defining the O_BINARY constant i.e. > eval ' sub O_BINARY () { 0 } '
How about just dropping the whole BEGIN {} part from Base.pm and use the constant IO::File already exports? -- dam
On Wed Aug 13 05:45:22 2008, dam@modsoftsys.com wrote: Show quoted text
> On Thu Sep 20 18:38:58 2007, SREZIC wrote:
> > I am not sure what's the best fix, but there seem to be two
possibilities: Show quoted text
> > * do not import anything from IO::File, i.e. write "use IO::File ()" > > * specify the prototype when defining the O_BINARY constant i.e. > > eval ' sub O_BINARY () { 0 } '
> > How about just dropping the whole BEGIN {} part from Base.pm and use the > constant IO::File already exports?
I am not sure if - O_BINARY is available on every platform where perl runs - O_BINARY was available in older perl versions Regards, Slaven
Show quoted text
> * do not import anything from IO::File, i.e. write "use IO::File ()"
I tried just that, and it seems to fix the problem without any side-effect as far as I could see. That is with my Linux (Ubuntu Jaunty) Perl: $ perl -V Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=linux, osvers=2.6.24-23-server, archname=i486-linux-gnu-thread-multi uname='linux rothera 2.6.24-23-server #1 smp wed apr 1 22:22:14 utc 2009 i686 gnulinux ' The change was : $ diff -U 1 /usr/share/perl5/XBase/Base.pm.orig /usr/share/perl5/XBase/Base.pm --- /usr/share/perl5/XBase/Base.pm.orig 2010-05-02 14:23:44.000000000 +0200 +++ /usr/share/perl5/XBase/Base.pm 2010-05-02 14:27:56.000000000 +0200 @@ -10,3 +10,3 @@ use strict; -use IO::File; +use IO::File (); use Fcntl qw( O_RDWR O_RDONLY );
I believe I have fixed the issue with DBD-XBase-1.01 which hit PAUSE today. Thanks for the report, Jan