Clear questions and runnable code
get the best and fastest answer
arno's scratchpadby arno (Scribe)
|on Aug 23, 2004 at 14:46 UTC||Need Help??|
1) AUTOLOAD subroutine from Time::Hires.pm
2) What i typed
3) The error message i got
I'm new to Autoloading and i face with a problem which i'd like to solve on my own.
I read the documentation of various things including AutoLoader module, UNIVERSAL class, and others but i still don't understand where constant subroutine comes from.
What i understand is that AUTOLOAD is executed when location of a subroutine failed that's to say the symbol name isn't in the stash %::.
Here, i believe $constname contains this unfound symbol because of the affectation :
($constant = $AUTOLOAD) =~ s/.*:://;
I believe constant($constname) is responsible of this error message as perldiag doesn't describe a similar compilation failure.
1) -- from Time::HiRes.pm :
2) --- what i did :
# perl -MTime::HiRes -e 1
3) --- what i get : ( i deleted what @INC contains in the output )
Can't locate loadable object for module Time::HiRes in @INC (@INC contains: ... ) at -e line 0
Compilation failed in require. BEGIN failed--compilation aborted.