This is surely just an internal optimization to save memory. It's not significant in this test data, but it could be for large duplicate structures. It should be transparent in any case that matters, no? The structure is readonly, so there is no danger in updates at least.
my $val = $data->[1]->{active};
print Dumper $val;
Prints:
$VAR1 = 1;
Which I admit is hardly worth the space it took to quote... Worst case there is this:
my $clean = [ map {{%$_}} @$data ];
print Dumper \$clean;
Outputs:
$VAR1 = \[
{
'name' => 'Bob Johnson',
'active' => 1,
'happy' => ''
},
{
'name' => 'Bill Johnson',
'active' => 1,
'happy' => 1
},
{
'name' => 'Frank Johnson',
'active' => '',
'happy' => ''
},
{
'name' => 'George Johnson',
'active' => '',
'happy' => 1
}
];