Perl-Sensitive Sunglasses | |
PerlMonks |
packages / modules in the same fileby jptxs (Curate) |
on Nov 13, 2001 at 19:30 UTC ( [id://125061]=perlquestion: print w/replies, xml ) | Need Help?? |
jptxs has asked for the wisdom of the Perl Monks concerning the following question:
NOTE: before telling me how terrible and wrong what I'm trying to do here is, know that I am aware of this and you can see NOTE2 at the bottom of this post for the reasons I'm doing it this way. I know DBI. I know this is bad form. There are reasons...
ah... Is it possible to use packages/modules all in one file? something like this: As you've guessed, that doesn't work. I've tried it without the Exporter stuff, after the call, using the OO syntax, putting in a use try; and some other dumber things. Am I barking up the wrong tree? Do you ABSOLUTELY have to have modules in different files? We speak the way we breathe. --Fugazi NOTE2: the reason for this is I am trying to sneak something in the back door simply to prove it can be done. I tried installing DBI in my own directory (This is *NIX) but it was a no go b/c I don't even have access to compilers, make, etc., etc. The reason for wanting it all in one file is for "perception of ease" on the part of some of those who are anti my idea. If I can just drop in one file, show what we need done getting done, then that proves the point soundly. The reason for the packges is that there will be different version of the SQL for different situations, which could be differentiated by calling $mod1::sql vs $mod2::sql. I would knee-jerk hate all this too, but I'm backed in a corner...
Back to
Seekers of Perl Wisdom
|
|