|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^2: Debugging PAR packaged programsby wanna_code_perl (Monk) |
| on Dec 09, 2008 at 17:34 UTC ( #729216=note: print w/ replies, xml ) | Need Help?? |
|
Nothing immediately obvious comes to mind. In cases like this, often the simplest solution is to instrument the code with some simple debug statements.
If you see the "activation code=" line, but your following $activationCode print doesn't show, then you know you have a parsing problem. If you never see the "activation code=" line at all, perhaps you're somehow missing reading the first line of the file. Anyway, even in the absence of external modules, this ugly code could have been made cleaner and less error prone with something like this:
This way, you don't pollute your global namespace with configuration variables, and you now have a 1:1 mapping between configuration variable names and hash keys, which has got to be easier to remember and maintain. You should still definitely have additional error checking and some validation checks after the file is read.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||