Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: AUTOLOAD returns '' as undef

by ioannis (Abbot)
on Oct 27, 2005 at 06:59 UTC ( #503254=note: print w/replies, xml ) Need Help??

in reply to AUTOLOAD returns '' as undef

if( "$new_value" ne "$self->{$function}") {
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.

It is a simple logical error, for a somewhat rare situation.

Replies are listed 'Best First'.
Re^2: AUTOLOAD returns '' as undef
by BarMeister (Beadle) on Oct 27, 2005 at 08:37 UTC
    Thanks, I have looked at this code for so long I figured it was some simple logic eyes have just glazed over after trying to debug this for so long...I initially thought it was how DBI was handling empty strings...since that is where I am populating the data from.

    Thanks for the help.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://503254]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2022-11-29 03:42 GMT
Find Nodes?
    Voting Booth?