The attribute can be set to '' only if it was previously set to something else. If the attribute was never previously initialized, and this is the first time you want to set it with the initial value of '', the if statement above will not test true (that is not what you intended) and will not allow you set it.if( "$new_value" ne "$self->{$function}") {
It is a simple logical error, for a somewhat rare situation.
In reply to Re: AUTOLOAD returns '' as undef
by ioannis
in thread AUTOLOAD returns '' as undef
by BarMeister
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |