Create a gist now

Instantly share code, notes, and snippets.

@gugod /has
Created May 4, 2009

Embed
What would you like to do?
yasnippets for coding with Mosoe
# 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;
#name : sub ... { $self... }
# --
sub ${1:function_name} {
my $self = shift;
$0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment