Skip to content

Instantly share code, notes, and snippets.

Created August 4, 2016 07:37
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 anonymous/d791314ff1561443443018509d869985 to your computer and use it in GitHub Desktop.
Save anonymous/d791314ff1561443443018509d869985 to your computer and use it in GitHub Desktop.
my %predef-hooks =
not_blank => { $^row.elems > 1 or $^row[0].defined && $^row[0] ne "" },
not_empty => { $^row.first: *.defined && * ne "" },
filled => { $^row.first: *.defined && * ~~ m/\S/ };
=>
Method 'match' not found for invocant of class 'Any'
--
my %predef-hooks =
not_blank => { $^row.elems > 1 or $^row[0].defined && $^row[0] ne "" },
not_empty => { $^row.first: *.defined && * ne "" },
filled => { $^row.first: *.defined && *.Str ~~ m/\S/ };
=>
Method 'match' not found for invocant of class 'WhateverCode'
--
my %predef-hooks =
not_blank => { $^row.elems > 1 or $^row[0].defined && $^row[0] ne "" },
not_empty => { $^row.first: *.defined && * ne "" },
filled => { $^row.first: *.defined && .Str ~~ m/\S/ };
=>
Use of uninitialized value $_ of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment