DBD-TreeData
view release on metacpan or search on metacpan
lib/DBD/TreeData.pm view on Meta::CPAN
# Add new id row
$ids->{trees}{$stree} = $icol.'_id|'.$id;
print_debug($depth+2, "ARRAY ===> $itbl_name => [ $id, $item ] (new ID/data row)");
push(@{$n->{data}}, [ $id, $item ]);
}
}
}
# Pass back an ID
my ($gid_col, $gid) = (pop(@max_id) || $col, pop(@group_id)); # undef @max_id might happen with an empty array
print_debug($depth+1, "ARRAY <=== $gid_col => $gid");
$serialized_tree =~ s/^(\W{1,2})XXXX/$1$gid_col/;
$ids->{trees}{$serialized_tree} = $gid_col.'|'.$gid;
$types->{$gid_col} = 'ID';
return $gid_col => $gid;
}
# An actual scalar; return back the proper column name and data
when ('' || undef) {
return type_detect($col, $tree);
}
# De-reference
when (/SCALAR|VSTRING/) {
return type_detect($col, $$tree);
}
# Warn and de-reference
( run in 1.661 second using v1.01-cache-2.11-cpan-97f6503c9c8 )