k Gurus, this is driving me crazy. Perhaps there is an obvious, logical explanation for this but I don't see one. I have a script:
Says it can't find the function myPackage::myFunction. MAIN::myFunction doesn't work either, when I try that instead. Is there any way to define a function that will work anywhere, including packages? I know if I manually import myFunction to the package it'll see it, but I'd rather not have to do that every time. Thoughts?
-Nick
Code:
sub myFunction {
print "hello.";
}
{ package myPackage;
myFunction();
}
Says it can't find the function myPackage::myFunction. MAIN::myFunction doesn't work either, when I try that instead. Is there any way to define a function that will work anywhere, including packages? I know if I manually import myFunction to the package it'll see it, but I'd rather not have to do that every time. Thoughts?
-Nick