Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created May 2, 2026 18:44
Show Gist options
  • Select an option

  • Save Whateverable/5b76df0bc412327d89ee5902df6b4216 to your computer and use it in GitHub Desktop.

Select an option

Save Whateverable/5b76df0bc412327d89ee5902df6b4216 to your computer and use it in GitHub Desktop.
evalable6
sub foo {my $v = to-bool("bar"); fail "it failed: {$_.Str}" without $v; 1;}; sub to-bool($s) {return True if $s.lc eq "true"; fail "oh no"}; foo()
(exit code 1)
it failed: (HANDLED) oh no
in sub to-bool at /tmp/V4QqhOQgoK line 1
in sub foo at /tmp/V4QqhOQgoK line 1
in block <unit> at /tmp/V4QqhOQgoK line 1
in sub foo at /tmp/V4QqhOQgoK line 1
in block <unit> at /tmp/V4QqhOQgoK line 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment