Skip to content

Instantly share code, notes, and snippets.

@gugod
Created May 4, 2009 14:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gugod/106480 to your computer and use it in GitHub Desktop.
Save gugod/106480 to your computer and use it in GitHub Desktop.
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