Skip to content

Instantly share code, notes, and snippets.

@jreisinger
Last active July 16, 2017 19:10
Show Gist options
  • Save jreisinger/b15fe939f2f129b58a63b6d633bfa1fb to your computer and use it in GitHub Desktop.
Save jreisinger/b15fe939f2f129b58a63b6d633bfa1fb to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use v5.14;
use warnings;
my %funcs = (
suberr => sub { return },
subok => sub { return 1 },
);
for ( keys %funcs ) {
say join ": ", $_, $funcs{$_}->() ? "ok" : "error";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment