Skip Menu |

This queue is for tickets about the Crypt-Random-Source CPAN distribution.

Report information
The Basics
Id: 93163
Status: resolved
Priority: 0/
Queue: Crypt-Random-Source

People
Owner: ether [...] cpan.org
Requestors: spudsoup [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.07
Fixed in: 0.08



Subject: Triggers waring from Moose 2.1200 or later
Steps to reproduce: 1. Update Moose to the latest stable version (2.1200 or later) 2. Call get_weak() from Crypt::Random::Source You get a warning about use of a deprocated function. See also: http://search.cpan.org/dist/Moose/lib/Moose/Manual/Delta.pod#2.1200
I have investigated a bit, and I have a patch that appears to make the problem go away. I am not sure if it is safe though. What do you think?
Subject: load_class_fix.patch
--- Crypt/Random/Source/Factory.pm_COPY 2014-04-24 16:06:31.511454851 +0100 +++ Crypt/Random/Source/Factory.pm 2014-04-24 16:29:33.203089457 +0100 @@ -8,6 +8,7 @@ # ABSTRACT: Load and instantiate sources of random data use Any::Moose; +use Class::Load 'load_class'; use Carp qw(croak); @@ -134,7 +135,7 @@ sub best_available { my ( $self, @sources ) = @_; - my @available = grep { local $@; eval { Any::Moose::load_class($_); $_->available }; } @sources; + my @available = grep { local $@; eval { Class::Load::load_class($_); $_->available }; } @sources; my @sorted = sort { $b->rank <=> $a->rank } @available; @@ -146,7 +147,7 @@ foreach my $class ( @sources ) { local $@; - return $class if eval { Any::Moose::load_class($class); $class->available }; + return $class if eval { Class::Load::load_class($class); $class->available }; } }
On Thu Apr 24 11:41:04 2014, SPUDSOUP wrote: Show quoted text
> I have investigated a bit, and I have a patch that appears to make the > problem go away. I am not sure if it is safe though. > > What do you think?
I agree with this approach. The wrapper provided in Class::MOP is calls the Class::Load version anyway. The only addition that should be made is to list Class::Load as a prerequisite in the Makefile.PL. It would be good to be able to fix this so that the warning can be done away with and so that future versions of Class::MOP that remove the function entirely will not break this module. If you don't have the time or interest in maintaining this module, please consider handing it off to someone else. I'd be happy to volunteer for this task if nobody else is appropriate, and you are willing to grant me the permission in PAUSE.
Show quoted text
> It would be good to be able to fix this so that the warning can be > done away with and so that future versions of Class::MOP that remove > the function entirely will not break this module. > > If you don't have the time or interest in maintaining this module, > please consider handing it off to someone else. I'd be happy to > volunteer for this task if nobody else is appropriate, and you are > willing to grant me the permission in PAUSE.
It appears I have comaint. Since I've been adopting a bunch of other modules by nuffin, I can do a release with a fix tonight.
Fixed in 0.08 release.