Skip to content

Instantly share code, notes, and snippets.

@gugod
Created May 4, 2009 14:24
Show Gist options
  • Select an option

  • Save gugod/106479 to your computer and use it in GitHub Desktop.

Select an option

Save gugod/106479 to your computer and use it in GitHub Desktop.
# name: has
# --
has ${1:attribute} => (is => "${2:rw}", isa => "${3:Str}");
# name: has lazy
# --
has ${1:attribute} => (
is => "${2:rw}",
isa => "${3:Str}",
lazy_build => 1
);
sub _build_$1 {
my $self = shift;
$0
}
#name : Moose
# --
use Moose;
$0
__PACKAGE__->meta->make_immutable;
no Moose;
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment