|go ahead... be a heretic|
Actually, it needs to be
You can't use __PACKAGE__ because it would be FOO::BAR -- not a pathname, and there is no file, so '1' (true) is fine.
looks all better if you turn it into a 'use mem' statement' by adding a dummy package 'mem' first:
After that's defined, then you can simply:
Note the '@EXPORT line -- this is required to make EXPORT work in 5.14 as one would expect. I don't remember this being the case at some previous point in time. But this is what was wrong with the original program. @EXPORTS in the original and 'Exporter' (maybe Exporter was changed), don't work at 'BEGIN/start' time, so if you use strict; nothing you export will be considered "legal"...
my 'use mem' module (all 2-3 lines of it!), is short for memorize this NOW for use in following code, or for the INC statements, use the memory cache for this routine and don't go to disk unnecessarily.
FWIW -- the original prog mentioned here, now works (though it looks quite different).
The single ~1600 line program has 17 classes and included 3 packages that can easily be re-integrated to run as 1 prog/file.
In reply to Correct syntax for using $INC to keep modules in same file