good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I ran through this with the debugger:
So the functions you are requiring are getting included in the package.. because that's where you require them. One thing that require does is "check for redundant loading, skipping already loaded files." So in this case, the required script is getting included in the package. The package is compiled first. The second time that require is called is at the main, however this is after the package has been compiled. So at that time, the require fails/does not include the package a second time. So I changed the main code to scope the function call:
and it works as expected. Alternatively you could do this in your main:
Which would force the require before the newform package, however you would have to also change the call to someFile in the newform package:
which might not make sense. Hazah! I'm Employed! In reply to Re: require issue.
by osunderdog
|
|