]> git.donarmstrong.com Git - perltidy.git/blobdiff - examples/filter_example.in
New upstream release (closes: #613417)
[perltidy.git] / examples / filter_example.in
diff --git a/examples/filter_example.in b/examples/filter_example.in
new file mode 100644 (file)
index 0000000..70172e5
--- /dev/null
@@ -0,0 +1,16 @@
+# input file for testing filter_example.pl
+use Method::Signatures::Simple;
+
+ method foo { $self->bar }
+
+       # with signature
+    method foo($bar, %opts) { $self->bar(reverse $bar) if $opts{rev};
+    }
+
+    # attributes
+    method foo : lvalue { $self->{foo} 
+}
+
+ # change invocant name
+    method 
+foo ($class: $bar) { $class->bar($bar) }