in reply to parsing parameters in a new() object call

goldclaw and chromatic nailed it. don't even ask me why i didn't try that myself, it just hadn't occurred to me yet.
all of you seem to have either mentioned my use of "exists", either explicitly, or by replacing it with different code. is this just something new with 5.6, or what? i forget where i ran across the idea to use it, but it works just fine on my system... just looked at perldoc.org, and couldn't find this use of it defined. it's not documented on perl.com either. so i have no idea. but i swear by my bones that it compiles and runs!

Replies are listed 'Best First'.
Re: thanks guys
by chipmunk (Parson) on Jan 25, 2001 at 21:40 UTC
    It is something new with 5.6:
    % perl -v This is perl, v5.6.0 built for i686-linux [snip] % perldoc perldelta [snip] exists() is supported on subroutine names The exists() builtin now works on subroutine names. A subroutine is considered to exist if it has been declared (even if implicitly). See the exists entry in the perlfunc manpage for examples. [snip]
    The perldelta documentation is the place to find out about significant changes in the latest version of perl. perldeltas from previous versions are also included in a new install, but renamed to include the version, e.g. perl5004delta.