Consider the simple example, with the array @objects of hashreferences:
package main 1.0;
use strict;
use warnings;
my @objects = (
{
name => 'object1',
value => 1
},
{
name => 'object',
value => 2
},
{
name => 'object2',
value => 3
},
{
name => 'object',
value => 4
},
);
my @objects_filter1 = grep { $_->{name} eq 'object' } @objects;
print @objects_filter1 . "\n";
1;
When going through the debugger, each array element is listed as Invalid variable attributes.
I filter the array down with a simple grep expression, and the result array @objects_filter shows the same problem.
Exploring the arrays in the WATCH window shows that everything is actually working as expected:
Consider the simple example, with the array
@objects
of hashreferences:When going through the debugger, each array element is listed as
Invalid variable attributes
.I filter the array down with a simple grep expression, and the result array
@objects_filter
shows the same problem.Exploring the arrays in the WATCH window shows that everything is actually working as expected: