Skip Menu |

This queue is for tickets about the LinkedList-Single CPAN distribution.

Report information
The Basics
Id: 133105
Status: new
Priority: 0/
Queue: LinkedList-Single

People
Owner: Nobody in particular
Requestors: jo [...] sommrey.de
Cc:
AdminCc:

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



Subject: meta data handling broken
Date: Sun, 02 Aug 2020 07:39:17 +0000
To: bug-LinkedList-Single [...] rt.cpan.org
From: Jörg Sommrey <jo [...] sommrey.de>
Hi, none of the meta data methods are working, they all throw a dereferencing error. #!/usr/bin/perl use strict; use warnings; use LinkedList::Single; my $lh = LinkedList::Single->new(1, 2, 3); eval { $lh->set_meta('meta'); }; print $@ if $@; eval { $lh->add_meta('added'); }; print $@ if $@; eval { $lh->get_meta; }; print $@ if $@; __DATA__ Not an ARRAY reference at /usr/local/share/perl/5.20.2/LinkedList/Single.pm line 242. Not an ARRAY reference at /usr/local/share/perl/5.20.2/LinkedList/Single.pm line 253. Not an ARRAY reference at /usr/local/share/perl/5.20.2/LinkedList/Single.pm line 264.
Subject: Re: [rt.cpan.org #133105] meta data handling broken - patch
Date: Sun, 02 Aug 2020 11:04:19 +0000
To: Bugs in LinkedList-Single via RT <bug-LinkedList-Single [...] rt.cpan.org>
From: Jörg Sommrey <jo [...] sommrey.de>
Here is a patch for this issue: --- /usr/local/share/perl/5.20.2/LinkedList/Single.pm 2014-09-08 19:54:41.000000000 +0200 +++ LinkedList/Single.pm 2020-08-02 12:55:14.198012082 +0200 @@ -236,7 +236,9 @@ { my $listh = shift; - my $root = $listh->root; + # looks like a typo + #my $root = $listh->root; + my $root = $listh->root_node; splice @$root, 1, $#$root, @_; @@ -247,7 +249,9 @@ { my $listh = shift; - my $root = $listh->root; + # looks like a typo + #my $root = $listh->root; + my $root = $listh->root_node; push @$root, @_; @@ -256,7 +260,9 @@ sub get_meta { - my $root = $_[0]->root; + # looks like a typo + #my $root = $_[0]->root; + my $root = $_[0]->root_node; wantarray ? @{ $root }[ 1 .. $#$root ]