Skip Menu |

This queue is for tickets about the Data-Throttler CPAN distribution.

Report information
The Basics
Id: 131703
Status: open
Priority: 0/
Queue: Data-Throttler

People
Owner: Nobody in particular
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.08
Fixed in: (no value)



Subject: try_push on unblessed reference
Receently I've started to get these: Can't call method "try_push" on unblessed reference at /home/hornenj/perlmods/share/perl/5.18.2/Data/Throttler.pm line 144. I can't debug it so easily since there's no check in the code that could cause a carp or crosk that would help me to check things. Would you please add something like this: die 'try_push: chain not defined' unless(defined($self->{data}->{chain})); my $ret = $self->{data}->{chain}->try_push(%options); Thanks.
On 2020-02-06 08:49:40, NHORNE wrote: Show quoted text
> Receently I've started to get these: > > Can't call method "try_push" on unblessed reference at > /home/hornenj/perlmods/share/perl/5.18.2/Data/Throttler.pm line 144. > > I can't debug it so easily since there's no check in the code that > could cause a carp or crosk that would help me to check things. > > Would you please add something like this: > > die 'try_push: chain not defined' unless(defined($self->{data}-
> >{chain}));
> my $ret = $self->{data}->{chain}->try_push(%options); > > Thanks.
A patch is available at: http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/Data-Throttler-0.08-RT131699.patch CPAN.pm users may use the following distroprefs file for automatic patching: https://github.com/eserte/srezic-cpan-distroprefs/blob/master/Data-Throttler.yml Regards, Slaven
Thanks for the patch. I'll see if that helps.