changing package template and a few others

This commit is contained in:
William Travis Holton 2012-07-25 22:27:09 +12:00
parent a5362402b8
commit dac0f8a7a6

View File

@ -79,7 +79,7 @@ snippet for
snippet fore snippet fore
${1:expression} foreach @${2:array};${3} ${1:expression} foreach @${2:array};${3}
# Package # Package
snippet cl snippet package
package ${1:ClassName}; package ${1:ClassName};
${2:#...} ${2:#...}
@ -88,23 +88,9 @@ snippet cl
__END__ __END__
# Moose package
snippet moosecl
package ${1:ClassName};
use Moose;
#extends '${2:# ParentClass}';
${3:#...}
1;
__END__
# Package syntax perl >= 5.12.0 # Package syntax perl >= 5.12.0
snippet package snippet packagev512
package ${1:ClassName} ${2:0.99}; package ${1:ClassName} ${2:0.99};
${3:#...} ${3:#...}
@ -117,6 +103,8 @@ snippet package
#moose #moose
snippet moose snippet moose
use Moose; use Moose;
use namespace::autoclean;
#extends '${2:# ParentClass}';
# moose extends # moose extends
snippet extends snippet extends
@ -300,8 +288,10 @@ snippet has
has ${1:attribute} => ( has ${1:attribute} => (
is => '${2:ro|rw}', is => '${2:ro|rw}',
isa => '${3:Str|Int|HashRef|ArrayRef|etc}', isa => '${3:Str|Int|HashRef|ArrayRef|etc}',
default => ${4:defaultvalue} default => sub {
,${5:# other attributes} ${4:defaultvalue}
},
${5:# other attributes}
); );
@ -316,7 +306,7 @@ snippet override
# use test classes # use test classes
snippet tuse snippet tuse
use Test::More; use Test::More;
use Test::Deep (); use Test::Deep; # (); # uncomment to stop prototype errors
use Test::Exception; use Test::Exception;
# local test lib # local test lib
@ -353,6 +343,7 @@ snippet tprep
my $self = shift; my $self = shift;
${4:# body} ${4:# body}
} }
# cause failures to print stack trace # cause failures to print stack trace
snippet debug_trace snippet debug_trace
use Carp; # 'verbose'; use Carp; # 'verbose';