Skip Menu |

This queue is for tickets about the MooseX-AttributeHelpers CPAN distribution.

Report information
The Basics
Id: 43343
Status: resolved
Priority: 0/
Queue: MooseX-AttributeHelpers

People
Owner: Nobody in particular
Requestors: amahabal [...] cpan.org
Cc: amahabal [...] gmail.com
stevan [...] iinteractive.com
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.14
Fixed in: 0.15



CC: stevan [...] iinteractive.com, amahabal [...] gmail.com
Subject: A bug in splice in MooseX::AttributeHelpers::MethodProvider::Array
When I run bug.pl, I get: amahabal@zunjar:~/s2$ perl bug.pl Can't locate object method "Accessor=HASH(0x87425e8)" via package "Moose::Meta::Method" at /usr/local/lib/perl5/site_perl/5.10.0/MooseX/AttributeHelpers/MethodProvider/Array.pm line 128. The following small change to the errant file fixes the problem: =========== Line 128 is currently CORE::splice @{$self->$reader()}, $i, $j, @elems; however, it should instead contain C<$reader->($self)>. Likewise on line 134. =========== Other corresponding pieces of the file already look like $reader->($self). Thanks, Abhijit
Subject: bug.pl
package Bug; use 5.010; use strict; use warnings; use Moose; use MooseX::AttributeHelpers; use version; our $VERSION = qv('0.01'); has 'codelets' => ( metaclass => 'Collection::Array', is => 'ro', isa => 'ArrayRef[Int]', default => sub { [] }, provides => { splice => 'splice_codelet' } ); no Moose; __PACKAGE__->meta->make_immutable; package main; my $bug = Bug->new(codelets => [2, 3, 4]); say $bug->splice_codelet(1, 1); 1;