Father Chrysostomos via RT wrote:: >> >> "use" checks object's 'define' already being in memory. > > But what does that mean exactly? That the package exists? Checking > whether a package exists is not reliable, as simply mentioning it in > compiled code will cause it to pop into existence: ---- In the case I refer to, I'm referring to whether or not the "package CLASSNAME"; has occurred, minimally, and ideally, if it has anything in it's namespace that might be a callable. Does it have any defined methods (subs/code) already loaded? That would likely be the most thorough. But you could simply check if CLASSNAME::Version was defined (had a value). Then you'd know some 'Version' of the CLASSNAME had been loaded into memory. That might be the easiest check. The important part here, is that "use" with a var have the semantics of checking for existence (by some method TBD (above?)), and not have it call "require BAREWORD" where BAREWORD is the CLASSNAME if the TBD test is true. Having Version defined w/o code might be a sufficiently 'corner' case as to not warrant concern; I would lean toward believing that at this point, but maybe both Version and method existence would be more thorough. What do you think, Father? ;-)Thread Previous | Thread Next