Hi Perl Monks!
I have been sometime (several years on a pilgrimage) away from larger-than-one-file Perl scripts and I have found problems using my own modules.
I learned the current working directory has been removed from @INC as a default and found a FindBin recipe in some website. However, I don't seem to understand it correctly. Please some advice.
This is my script, which uses my own module called "basedat" (to connect to a database and hide all the ugly details):
#!/usr/bin/perl # Connection to database use FindBin qw($Bin); use basedat "$Bin/basedat"; $dbh = basedat::new(); if (defined($dbh)) { print "connection ok!\n"; }
Both, this script and my module, called basedat.pm, are in the same directory. Yet, when executed the script still says it cannot locate basedat.pm.
Any light you could shed would be greatly appreciated
In reply to Cannot find my own modules by core_dumped
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |