|Welcome to the Monastery|
Re^3: Using Modulesby Anonymous Monk
|on Oct 21, 2007 at 04:23 UTC||Need Help??|
Ok, I did find something that works, partly...
UNIVERSAL::require, did work partly
Here is how I did it:
That does run that subroutine, chargeCard.
The problem is that it runs it before anything and everything, so even my $dbh database connection is not set, so I get errors like this:
so I know it is like it is making my module execute before EVERYTHING else.
Is there a way to make this work, where it executes it right where it is at, so that the rest of my code will work with those in there?
I don't usually use my own modules, normally I do everything locally. Am I allowed to use variables I have in my main perl program in modules? Or am I supposed to import them all in, some way?
Thank you all very much for any advice you can be.