[OT] best way to determine existence of a function in a package

Dirk Koopman djk at tobit.co.uk
Mon Nov 19 09:53:41 GMT 2007

The problem:

A user may include a local version of a package which may include one or 
  more local versions of a static function (there are no references, 
blessed or otherwise to ->can() on).

I want to detect whether or not that function is explicitly defined.

if (defined *Local::function) {

except that expression always returns true, which is rather a nuisance.

More information about the london.pm mailing list