in reply to undef vs 0
If you wrote the module, why not add a second argument to the getConfigValue() function to act as a default value? Then the check for defined is hidden inside the module and your calling code is as simple as my $value = getConfigValue( "use_foo", 1 );.
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: undef vs 0
by skx (Parson) on Feb 06, 2003 at 19:06 UTC |