in reply to Re^6: panic: attempt to copy freed scalar a7b9650 to ad20598
in thread panic: attempt to copy freed scalar a7b9650 to ad20598
my with a statement modifier on the end is generally (almost universally?) a bad thing (unless it's a workaround for a weird issuemy $clientref = $job->{clientref} if (exists($job->{clientref}));
Update: Actually, I don't see any reason to not just do (since the value will be undef if the key doesn't exist, and it won't be autovivified in the hash):my $clientref = exists($job->{clientref}) ? $job->{clientref} : undef;
Update: ikegami is correct below. His post did not use "my...if...". My bad :-(my $clientref = $job->{clientref};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: panic: attempt to copy freed scalar a7b9650 to ad20598
by ikegami (Patriarch) on Dec 03, 2009 at 21:16 UTC | |
|
Re^8: panic: attempt to copy freed scalar a7b9650 to ad20598
by mje (Curate) on Dec 04, 2009 at 15:57 UTC |