summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Attribute/Handlers/demo/demo2.pl21
-rwxr-xr-xlib/Attribute/Handlers/demo/demo3.pl16
-rwxr-xr-xlib/Attribute/Handlers/demo/demo4.pl9
3 files changed, 46 insertions, 0 deletions
diff --git a/lib/Attribute/Handlers/demo/demo2.pl b/lib/Attribute/Handlers/demo/demo2.pl
new file mode 100755
index 0000000000..387ab4407d
--- /dev/null
+++ b/lib/Attribute/Handlers/demo/demo2.pl
@@ -0,0 +1,21 @@
+#! /usr/local/bin/perl -w
+
+use v5.6.0;
+use base Demo;
+no warnings 'redefine';
+
+my %z1 :Multi(method?maybe);
+my %z2 :Multi(method,maybe);
+my %z3 :Multi(qw(method,maybe));
+my %z4 :Multi(qw(method maybe));
+my %z5 :Multi('method','maybe');
+
+sub foo :Demo(till=>ears=>are=>bleeding) {}
+sub foo :Demo(['till','ears','are','bleeding']) {}
+sub foo :Demo(qw/till ears are bleeding/) {}
+sub foo :Demo(till,ears,are,bleeding) {}
+
+sub foo :Demo(my,ears,are,bleeding) {}
+sub foo :Demo(my=>ears=>are=>bleeding) {}
+sub foo :Demo(qw/my, ears, are, bleeding/) {}
+sub foo :Demo(qw/my ears are bleeding) {}
diff --git a/lib/Attribute/Handlers/demo/demo3.pl b/lib/Attribute/Handlers/demo/demo3.pl
new file mode 100755
index 0000000000..6760fc08ba
--- /dev/null
+++ b/lib/Attribute/Handlers/demo/demo3.pl
@@ -0,0 +1,16 @@
+package main;
+use MyClass;
+
+my MyClass $x :Good :Bad(1**1-1) :Omni(vorous);
+
+package SomeOtherClass;
+use base MyClass;
+
+sub tent { 'acle' }
+
+sub w :Ugly(sister) :Omni('po',tent()) {}
+
+my @y :Good :Omni(s/cie/nt/);
+
+my %y :Good(q/bye) :Omni(q/bus/);
+
diff --git a/lib/Attribute/Handlers/demo/demo4.pl b/lib/Attribute/Handlers/demo/demo4.pl
new file mode 100755
index 0000000000..22d9fd983b
--- /dev/null
+++ b/lib/Attribute/Handlers/demo/demo4.pl
@@ -0,0 +1,9 @@
+use Descriptions;
+
+my $capacity : Name(capacity)
+ : Purpose(to store max storage capacity for files)
+ : Unit(Gb);
+
+package Other;
+
+sub foo : Purpose(to foo all data before barring it) { }