That tutorial is very good, thanks a lot for that. I will definitely follow it.
I have one specific question about the templates thing still unanswered though. Say I have a module like this, and there's an essential file right there in the same directory as TestModule.pm
package TestModule; open( FILE, '<', 'essential_file.txt' ) or die("Can't open file"); 1;
and I run it like this:
require TestModule; print "hello world";
It will fail (unless the script is in the same directory as TestModule).
I'm probably missing something obvious but how do I get the file path right so that TestModule.pm can find its file, no matter where it's called from?
In reply to Re^2: Tutorial on making a proper module?
by Cody Fendant
in thread Tutorial on making a proper module?
by Cody Fendant
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |