vim-snippets/snippets/perl-moosesnippets.snippets

51 lines
618 B
Plaintext
Raw Normal View History

2011-06-27 16:13:31 -04:00
# #!/usr/bin/perl
# Moose package
snippet moosecl
package ${1:ClassName};
use Moose;
#extends ${2:# ParentClass};
${6:# body of class}
1;
2011-06-27 16:32:23 -04:00
2011-06-27 16:13:31 -04:00
__END__
=head1 NAME
$1 - ${3:ShortDesc}
=head1 SYNOPSIS
${4:# synopsis...}
=head1 DESCRIPTION
${5:# longer description...}
# has
snippet has
has ${1:attribute} => ( #{{{
is => '${2:ro|rw}',
isa => '${3:Str|Int|HashRef|ArrayRef|etc}',
default => ${4:defaultvalue}
,${5:# other attributes}
); #}}}
2011-06-27 16:32:23 -04:00
# override
snippet override
override ${1:attribute} => sub { #{{{
${2:# my $self = shift;};
${3:# my ($self,$args) = @_;};
}; #}}}