Spot-on. I've got a number of modules which contain sub-routines that are called, including calls to and from other sub-routines in other modules.
The one causing the problem is recursive and calls itself to fill an array with all the files found in a directory tree. Calling that sub-routine from another module is where I ran into the printing oddity ( odd to me ) when testing it out.
I'm still fuzzy on the evaluation part. I had thought that the evaluation was just checking the script for syntax and reference errors - essentially, "static" script problems. I didn't think the evaluation also includes running the sub-routines to check for run-time errors.
Is that what actually happens - that Perl does a "test-run" of the sub-routines in addition to checking for syntax and reference errors ?
In reply to Re^2: sub running on use statement
by Anonymous Monk
in thread sub running on use statement
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |