in reply to Re: How to check if a function exists within a package?
in thread How to check if a function exists within a package?

if ( defined( &perlmonk::funnyfunction ) )

Why wouldn't that call the function passing in @_ and check defined on the result? I mean, I see that it doesn't do that, but why? You have to put the ()'s on the end of it to get what I'd expect.

-Paul

Replies are listed 'Best First'.
Re^3: How to check if a function exists within a package?
by ikegami (Patriarch) on Sep 08, 2008 at 02:11 UTC
    It's just another special parsing rule. exists and goto are exactly the same, but they are hardly the only three functions that have special parsing rules. map's curlies don't create a hash. print's file handle isn't a function name. And the list goes on.