jdetloff has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks, I have a very perplexing (to me at least) and frusterating problem. I seem to be somehow messing up a very simple subroutine call, but I can't for the life of me discover what I'm doing wrong
#!/usr/bin/perl use lib "C:/Program Files/Perl Express/Scripts"; package ClanBotFire; sub heyhey { print "hello world"; } 1;
#!/usr/bin/perl use lib "C:/Program Files/Perl Express/Scripts"; ClanBotFire::heyhey();
A google search reveals people having problems with this (getting undefined subroutine error when your subroutine should be defined) when they have more than one subroutine with the same name, or when there's a namespace conflict with two packages, but my routine and module are uniquely named. Any ideas of what could be going wrong?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Undefined Subroutine Called
by Corion (Patriarch) on Jan 24, 2010 at 21:38 UTC | |
by jdetloff (Acolyte) on Jan 24, 2010 at 21:46 UTC | |
|
Re: Undefined Subroutine Called
by biohisham (Priest) on Jan 24, 2010 at 21:58 UTC |