in reply to In Defense of Smart::Comments

I've used Smart::Comments a bit after reading Damian's PBP, but I find Log::Log4perl much more useful overall:

Replies are listed 'Best First'.
Re^2: In Defense of Smart::Comments
by ikegami (Patriarch) on Jun 01, 2010 at 06:15 UTC
    Half of point #2 is not valid as you can do the same with Smart::Comments.
    perl ... off perl -MSmart::Comments ... on (###) perl -MSmart::Comments,'###' ... on (###) perl -MSmart::Comments,'###','####' ... on (###, ####)

      I meant script command-line options, as in ./myscript -vvv. Users do not know (nor they should!) about perl and its option syntax to provide a tracelog.

      So yes, it's technically possible, but even when debugging my own script, typing perl -MSmart::Comments,'###','####' /usr/local/bin/myscript is not really convenient.

        You can have -vvv turn on debugging whichever module you are using.
      Half of point #2 is not valid as you can do the same with Smart::Comments.
      Additionally, Log::Log4perl allows you to modify the verbosity of a running application (using the init_and_watch flag, albeit with a small overhead). This can be very handy if a production system shows symptoms one wants to investigate while policy prevents restart.
      --
      No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]