You could call cluck() conditionally based on the value of $^D. Something as simple as ( $^D || cluck() ) may suffice.
See both perlrun and perldebug for a number of gotchas with this method.
Regards,
PN5
In reply to Re: Translate debug code to a debugging technique
by Prior Nacre V
in thread Translate debug code to a debugging technique
by hlen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |