huh?
push @{$this->{local_vars}}, [my ($open_tag, $tag_print, $cur_class, $cur_id, $defines_class, $defines_id, $tag_output )]; $open_tag = 123; use Data::Dumper; print(Dumper($this));
$VAR1 = { 'local_vars' => [ [ undef, undef, undef, undef, undef, undef, undef ] ] };
Mind you, putting the assignment to local_vars at the bottom will avoid aliases. That's the solution I suggested in your earlier thread.
my ($open_tag, $tag_print, $cur_class, $cur_id, $defines_class, $defines_id, $tag_output ); $open_tag = 123; push @{$this->{local_vars}}, [$open_tag, $tag_print, $cur_class, $cur_id, $defines_class, $defines_id, $tag_output];
$VAR1 = { 'local_vars' => [ [ 123, undef, undef, undef, undef, undef, undef ] ] };
In reply to Re^3: Error using Data::Alias (how to allocate array w/o filling it in?) and help avoiding 'constant' len?
by ikegami
in thread Error using Data::Alias (how to allocate array w/o filling it in?) and help avoiding 'constant' len?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |