in reply to Re^2: Autoloading and anonymous subs
in thread Autoloading and anonymous subs
package Foo; sub bar; # we'll define that later \&bar; # same effect
In fact, that's how AutoLoader works - it loads a modules autosplit.ix file which contain forward declarations of subs to be loaded. The CODE slot of the typeglob is allocated, but it's empty. That's why calling such a sub AutoLoader's AUTOLOAD is called, which requires the sub's source file on the fly.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|