diff options
-rw-r--r-- | template/perl/snip-method.pl | 6 | ||||
-rw-r--r-- | template/perl/snip-new.pl | 5 | ||||
-rw-r--r-- | template/perl/snip-sub.pl | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/template/perl/snip-method.pl b/template/perl/snip-method.pl new file mode 100644 index 0000000..e51e2d8 --- /dev/null +++ b/template/perl/snip-method.pl @@ -0,0 +1,6 @@ +sub {{_input_:function name}} { + my $self = shift; + my @args = @_; + {{_cursor_}} +} + diff --git a/template/perl/snip-new.pl b/template/perl/snip-new.pl new file mode 100644 index 0000000..1f987d8 --- /dev/null +++ b/template/perl/snip-new.pl @@ -0,0 +1,5 @@ +sub new { + my $class = shift; + return bless { @_ } , ref $class || $class; +} + diff --git a/template/perl/snip-sub.pl b/template/perl/snip-sub.pl index 32f0e6d..3d63276 100644 --- a/template/perl/snip-sub.pl +++ b/template/perl/snip-sub.pl @@ -1,5 +1,5 @@ sub {{_input_:function name}} { - my ($self{{_input_:arguments}}) = @_; + my @args = @_; {{_cursor_}} } |