[thelist] Request for Perl Code Reviewers / Bug Hunters?
Morbus Iff
morbus at disobey.com
Fri May 24 10:08:03 CDT 2002
Mmkay. I'm looking Perl people to lend an extra pair of eyeballs to a
largish program (2000+ lines), in the hunt for idiocies, dumb Morbusisms,
and bugs I haven't discovered, errors I haven't catered to, or what have you.
It's a non-paying gig, but it's open source software, so I'll certainly
include your name in shining lights somewhere. Contact me offlist if you're
interested.
<tip author="morbus at disobey.com">
If you're coding a Perl program that uses its own lib/ directory, or really
*any* relative subdirectory, then you'll do yourself some good to look into
a module called "FindBin":
# where are we?
use FindBin qw($Bin);
BEGIN { unshift(@INC,"$Bin/lib") }
Instead of "use lib" or "use Cwd", FindBin will determine the full path to
your script, not just the current working directory. Using FindBin will
stop this stuff from happening:
# program works happily.
cd /usr/bin/program
./program.pl
# program fails due to not finding
# a lib directory in a statement like
# "use lib 'lib'" or my $dir = getcwd;
cd /tmp
/usr/bin/program/program.pl
</tip>
--
Morbus Iff ( i'm the droid you're looking for )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Tech: http://www.oreillynet.com/pub/au/779 - articles and weblog
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
More information about the thelist
mailing list