in reply to Perl autovivifyies object property when using exists
output:$ perl -MData::Dump -E '$fs4={_structure=>{"/Users/dotfiles/perl5/my_ +modules"=>{}}};my $b= $fs4->{_structure}{"/Users/dotfiles/perl5/my_mo +dules"};say (exists $b->{BLAH} and exists $b->{BLAH}{crap}); say dd( +$fs4)'
{ _structure => { "/Users/dotfiles/perl5/my_modules" => {} } } 1
"If it happens once, it's a bug. If it happens twice, it's a feature. If it happens more than twice, it's a design philosophy."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl autovivifyies object property when using exists
by nysus (Parson) on Apr 03, 2024 at 19:12 UTC | |
|
Re^2: Perl autovivifyies object property when using exists
by nysus (Parson) on Apr 03, 2024 at 18:59 UTC | |
|
Re^2: Perl autovivifyies object property when using exists
by nysus (Parson) on Apr 03, 2024 at 18:50 UTC |