On Dec 22, 2003, at 1:51 PM, Owen wrote:
On Tue, 23 Dec 2003 09:53:09 +1300 Support <[EMAIL PROTECTED]> wrote:
use Pcalc qw(Delta_Days Add_Delta_Days Date_to_Days leap_year check_date);
See my previous message, you need to make a a directory "Date" in your working directory and place Pcalc in there
use Date::Pcalc qw(Delta_Days Add_Delta_Days Date_to_Days leap_year check_date);
ok, now we get to the nub of the crisis.
The File is Pcalc.pm, but the package line says
package Date::Pcalc;
cf: <http://search.cpan.org/src/STBEY/Date-Pcalc-1.2/Pcalc.pm>
what seems to have happened is that perl FOUND the file Pcalc.pm, and looked in it, as you asked, with your
use Pcalc.pm
for the package Pcalc - to import the LIST that you have provided it. But of course the File does not have such a package in it, and hence could not import any of those symbols.
/some/dir/ foo.cgi Date/Pcalc.pm
thus when the foo.cgi is invoked, the
use Date::Pcalc qw(Delta_Days Add_Delta_Days Date_to_Days leap_year check_date);
line will look in the sub_directory Date for a file Pcalc.pm and read it for a package named
package Date::Pcalc;
to look for the LIST of symbols to resolve...
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>