Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

_ shortcut for --grep and --map expressions

  • Loading branch information...
commit a115b6d35c4b58c7e0435be6b31afa8becfc1519 1 parent e5fab3f
@hoytech authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  bin/log-defer-viz
View
3  bin/log-defer-viz
@@ -122,6 +122,9 @@ my ($term_cols, $term_rows) = Term::Size::chars(*STDOUT{IO});
$columns = $term_cols if $term_cols;
+## The _ sub is a shortcut for --grep and --map expressions, ie --grep '_->{data}'
+sub _ () { $_ }
+
if ($opt->{grep}) {
$opt->{grep} = eval('sub { local $_ = $_[0]; ' . $opt->{grep} . '}');
die "Error compiling --grep expression: $@" if $@;
Please sign in to comment.
Something went wrong with that request. Please try again.