I have a module in the parent directory of my script and I would like to ‘use’ it.
If I do
use '../Foo.pm';
I get syntax errors.
I tried to do:
push @INC, '..'; use EPMS;
and .. apparently doesn’t show up in @INC
I’m going crazy! What’s wrong here?
usetakes place at compile-time, so this would work:But the better solution is to
use lib, which is a nicer way of writing the above:In case you are running from a different directory, though, the use of
FindBinis recommended: