elasticsearch-perl icon indicating copy to clipboard operation
elasticsearch-perl copied to clipboard

prereq Log::Any::Adapter:Callback is deprecated

Open Tux opened this issue 4 years ago • 2 comments

other than me not wanting to install deprecated modules, I have a global red flag on modules from PERLANCAR, because it might drag in half of CPAN or useless duplications of other good modules.

Please make this prereq optional

Tux avatar Jan 28 '21 13:01 Tux

Log::Any::Adapter::Callback's documentation says:

DEPRECATION NOTICE: Log::Any distribution since 1.708 comes with Log::Any::Adapter::Capture which does the same thing. I'm deprecating this adapter now.

..so it should be straightforward to switch.

karenetheridge avatar Jan 29 '21 00:01 karenetheridge

@Tux thanks for reporting this and @karenetheridge thanks for the alternative proposal. I just checked Log::Any::Adapter::Capture and we need to refactor t/lib/LogCallback.pl that actually is as follows:

use Log::Any::Adapter::Callback 0.09;
use Log::Any::Adapter;

our ( $method, $format );
Log::Any::Adapter->set(
    'Callback',
    min_level  => 'trace',
    logging_cb => sub {
        ( $method, undef, $format ) = @_;
    },
    detection_cb => sub {
        $method = shift;
    }
);

1

Of course, if you are familiar with Log::Any you are more then welcome to send a PR for this. Thanks!

ezimuel avatar Feb 04 '21 11:02 ezimuel

Closing this since not relevant anymore.

ezimuel avatar Jan 25 '24 11:01 ezimuel