Update: I'm an idiot. I had a typo, as toolic has pointed out. Thanks.
I'm seeing some odd behaviour that someone will no doubt be able to explain.
If I try to use a module method without using the module first, I get a somewhere misleading error ..
Yet both of the following are fine:[foo@bar test]$ perl -de 1 Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 1 DB<1> $time = Time::Local::timelocal(0,0,13,26,8,2009) Undefined subroutine &Time::Local::timelocal called at (eval 7)[/fooba +r/system/pkg/perl-5.8.6/lib/5.8.6/perl5db.pl:628] line 2.
and[foo@bar test]$ perl -de 1 Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 1 DB<1> use Time::Local DB<2> $time = Time::Local::timelocal(0,0,13,26,8,2009) DB<3> x $time 0 1253962800
However, declaring the module from the command line doesn't work ..[foo@bar test]$ perl -de 1 Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 1 DB<1> use Time::Local DB<2> $time = timelocal(0,0,13,26,8,2009) DB<3> x $time 0 1253962800
Can someone point me to what's happening here? Thanks.[foo@bar test]$ perl -MLocalTime -de 1 Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. Can't locate LocalTime.pm in @INC (@INC contains: /foobar/system/pkg/p +erl-5.8.6/lib/5.8.6/sun4-solaris /foobar/system/pkg/perl-5.8.6/lib/5. +8.6 /foobar/system/pkg/perl-5.8.6/lib/site_perl/5.8.6/sun4-solaris /f +oobar/system/pkg/perl-5.8.6/lib/site_perl/5.8.6 /foobar/system/pkg/pe +rl-5.8.6/lib/site_perl /foobar/system/lib/site_perl .). at -e line 0 main::BEGIN() called at LocalTime.pm line 0 eval {...} called at LocalTime.pm line 0 BEGIN failed--compilation aborted. at -e line 0 Debugged program terminated. Use q to quit or R to restart, use O inhibit_exit to avoid stopping after program termination, h q, h R or h O to get additional info.
In reply to Module hide and seek by talexb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |