Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Cannot Remove Redefined Warnings

by Tux (Canon)
on May 06, 2025 at 06:15 UTC ( [id://11164958]=note: print w/replies, xml ) Need Help??


in reply to Cannot Remove Redefined Warnings

The cause of this new warning is withing the perl core itself, caused this commit.

It happens only when using threads and the boot code of DBD::Oracle is called twice.

Then the boot code tries to re-install the oracle specific methods and constants using DBI's internal install_method call.

You can indeed suppress that warning in DBI.pm, using something similar to

my (undef, $filename, $line) = caller; # XXX reformat $attr as needed for _install_method my %attr = %{$attr || {}}; # copy so we can edit { no warnings "redefine"; DBI->_install_method ("DBI::${subtype}::$method", "$filename a +t line $line", \%attr); }

but that sweeps the warning under the carpet.

narrowing the scope, the warning is generated from the call cv = newXS_flags (meth_name, XS_DBI_dispatch, file)<c> in <c>DBI.xs in _install_method.

My personal opinion is that the boot code of DBD::Oracle is wrong, but at this moment, I have no idea of how to fix that.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Cannot Remove Redefined Warnings
by Sukhster (Sexton) on May 06, 2025 at 13:47 UTC

    Thanks for that code to suppress warnings. It worked.

    Not ideal, i.e. it does sweep the issue under the carpet. However, buys me some time to find a more elegant solution - and keep the latest code.

    Note - l did revert from 5.40.2 to 5.38.4 (from 5.38.0), and will try to upgrade again in a couple of months time.

    I have joined the DBI Mailing List to post the issue, but am waiting to get the permissions to raise it

      I think you could also address the issue by only loading DBI from the code executing in the threads.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11164958]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2026-03-06 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.