in reply to Re: does a subroutine exist? defined vs glob
in thread does a subroutine exist? defined vs glob

Yes. To amplify the point about autoloading, try this:
use Config; print "defined before\n" if defined &Config::non_bincompat_options; Config::non_bincompat_options(); print "defined after\n" if defined &Config::non_bincompat_options;
Calling the sub causes it to become defined through autoloading.

Replies are listed 'Best First'.
Re^3: does a subroutine exist? defined vs glob
by Anonymous Monk on Jul 23, 2015 at 16:54 UTC
    ... and there's a bit of magic that I hadn't realized before, because you can do the same thing with a coderef.
    use Config; my $sub = *Config::non_bincompat_options{CODE}; print "defined before\n" if defined &$sub; $sub->(); print "defined after\n" if defined &$sub;
    Same result: not defined before, but defined after.