Skip to content

Instantly share code, notes, and snippets.

@sorear
Created August 7, 2010 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorear/512527 to your computer and use it in GitHub Desktop.
Save sorear/512527 to your computer and use it in GitHub Desktop.
sub Dlog (Str $name, Code $code, *@_) {
my $old_ = $_;
$_ = @_ ?? @_.perl !! q<()>;
my @ret = do-log( $name, get-logger( caller ), $code, @_ );
$_ = $old_;
return @ret;
}
my &Dlog-trace is export = &Dlog.assuming('trace');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment