No such thing as a small change | |
PerlMonks |
Re^3: If unsuccessful actionby 1nickt (Canon) |
on Apr 03, 2020 at 22:01 UTC ( [id://11115016]=note: print w/replies, xml ) | Need Help?? |
Hi again, It's of course up to you how you debug. I showed the simplest pseudo action I could, as an example. But note that say is only available in Perl version >= 5.10 (and must be imported with use feature 'say'; or use 5.010;. It's the equivalent of print "$str\n";). Since you are starting a big ex post facto debugging project, you might like to begin to implement a logging system (using Log::Any) so that once you've fixed your issues you can run at a higher log level and the log statements you entered to debug will be ignored, but still there for future use (and could use different output adapters in production than in beta/testing, for example). That's what I would do. For a more quick-and-dirty tool while really debugging, where you aren't going to want to keep the statement, there's a newly updated module XXX by the mad genius Ingy döt Net I noticed recently that might be helpful. Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|