Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created April 10, 2012 15:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tadzik/2352043 to your computer and use it in GitHub Desktop.
sub warn-backtrace(Str $text) {
my $where = Backtrace.new.[2];
note "$text at line {$where.line}, file {$where.file}";
}
warn-backtrace("foobar");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment