On Sun, May 3, 2009 at 2:22 PM, Hans Dieter Pearcey <h...@pobox.com> wrote:
> On Sun, May 03, 2009 at 10:24:54AM -0500, fREW Schmidt wrote: > > [ %{$data}->values->map->(sub { $_ + 1 }) ] > > don't dereference $data; your sanity check example uses a hashref, not a > hash, > so it works fine. I must be missing something, because I tried that and it still doesn't work. To be clear, here's the class: package Foo; use Moose; use Carp qw(croak carp cluck); use Method::Signatures; use Moose::Autobox; method foo { my $data = { foo => 1, bar => 2, }; return { [ $data->values->map->(sub { $_ + 1 }) ] }; } no Moose; __PACKAGE__->meta->make_immutable; And now I get this error: Can't call method "values" on unblessed reference -- fREW Schmidt http://blog.afoolishmanifesto.com