in reply to My Perl journey begins
I've gotten the most use out of Log::Any. I wrote my own minimalist adapter for it Log::Any::Adapter::Daemontools which can change the log level on the fly in response to SIGUSR1 and SIGUSR2. And then I have written in-house Plack middleware that can change the log level depending on a browser cookie. (I might get that published some day) The end result is that I can set that secret cookie on my browser and then perform actions on the production system and see the full trace output even while other users are hitting the same server and generating minimal log output. (The log output stays in the server logs, so there isn't any security risk in this cookie as there would be if it pushed the logs to the browser.)
The other thing Perl has that kills the need for a debugger is nice easy unit testing. See Test::More or Test2. If you structure your program as a collection of small mostly-independent modules, you can wrap each of them with unit tests and work out all the bugs before you assemble them into anything complicated. It's amazing how few bugs I end up having in the main program if I've fully tested each of the components first. And there's always "perl -d" for debugging the unit tests, if the log wasn't enough.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: My Perl journey begins
by LanX (Saint) on Aug 19, 2022 at 21:54 UTC |