Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Perl module references
Maninder_IBM
Quick Question.
Since moving to 6.5 has anyone experienced any issues with the way they are referencing code in perl modules?
This is how we do it.
require 'd:\iw-home\custom\bin\bootsIWUtils.pm';
then
access code in it using,
my $dbh = bootsIWUtils::connectToSiteDatabase();
But I get the following error since migrating.
"undefined subroutine bootsIWUtils::connectToSiteDatabase"
Am I missing something here?
Find more posts tagged with
Comments
Adam Stoller
I almost never use 'require' - I almost always use 'use' -- and a lot of what happens depends on how the module itself was written.
I believe that most modules are expecting to be accessed via 'use' these days.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
chuckles
TS 6.5 has a newer version of Perl if I am not mistaken. Might be related to that. Agree with ghoti that I never use "require" and always use "use".
Maninder_IBM
Thanks for your replies guys.
This is in a workflow by the way. That migth make a difference. Any ideas Anyone?
shanon
well, i would just write a little wrapper script and try to do it on the cmd line:
use bootsIWUtils;
my $dbh = bootsIWUtils::connectToSiteDatabase() or die "Here's the error: $!\n";
print "we're good.";
see what happens...
Shanon Levenherz
Mercer eBusiness Team
shanon.levenherz@mercer.com
http://www.mercerhr.com