Skip to content

Instantly share code, notes, and snippets.

package A;
use Moo;
use Mouse::Util::TypeConstraints ();
sub mouse_isa ($) {
my $t = Mouse::Util::TypeConstraints::find_or_create_isa_type_constraint($_[0]);
return sub { $t->assert_valid($_[0]) };
}
has foo => (
#!/usr/bin/perl
use strict;
use warnings;
use List::MoreUtils qw(any);
sub git;
chdir git('rev-parse --git-dir') . '/..';
my @submodules = map [split /\s+/]->[-1], grep /^160000 /, git 'ls-files --stage';