summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-07-24 10:40:38 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-07-24 10:40:38 +0200
commit647c02bf0846c64abfeddecbf76a2611efe8f6c9 (patch)
tree9e6ea8fb85fb0340ff65d0a3202dd09334c71b25
parentabcb1309ce915d1ff6ba6a0102395e66ee7b26b9 (diff)
downloaddotfiles-647c02bf0846c64abfeddecbf76a2611efe8f6c9.tar.gz
dotfiles-647c02bf0846c64abfeddecbf76a2611efe8f6c9.tar.xz
vim: Update perl snippets
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--.vim/UltiSnips/perl.snippets12
1 files changed, 7 insertions, 5 deletions
diff --git a/.vim/UltiSnips/perl.snippets b/.vim/UltiSnips/perl.snippets
index b480482..61d9a83 100644
--- a/.vim/UltiSnips/perl.snippets
+++ b/.vim/UltiSnips/perl.snippets
@@ -1,12 +1,14 @@
snippet new
-sub new {
- my $class = shift;
+method new($class: $deps = {}) {
+ ${0}
+ return $class->new_no_defaults($deps);
+}
+method new_no_defaults($class: $deps = {}) {
my $self = {};
bless $self, $class;
-
- ${0}
-
+ $self->{deps} = $deps;
return $self;
}
+
endsnippet