in reply to Re^2: Poor man's logging
in thread Poor man's logging

Didn't read close enough I guess - but the necessary changes are trivial.
use constant DEBUG => do { my %dlv = map /^(.+?)(?:=(\d+))?$/, split /,/, $ENV{DEBUG} || ''; $dlv{(__PACKAGE__)} || exists $dlv{(__PACKAGE__)} || $dlv{all} || exists $dlv{all}; };

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^4: Poor man's logging
by adrianh (Chancellor) on Dec 12, 2002 at 20:38 UTC

    Nice :-) Much more readable than mine.