Mithing.
Jarkko Hietaniemi [Fri, 14 Dec 2001 23:33:28 +0000 (23:33 +0000)]
p4raw-id: //depot/perl@13692

lib/Attribute/Handlers/demo/demo2.pl [new file with mode: 0755]
lib/Attribute/Handlers/demo/demo3.pl [new file with mode: 0755]
lib/Attribute/Handlers/demo/demo4.pl [new file with mode: 0755]

diff --git a/lib/Attribute/Handlers/demo/demo2.pl b/lib/Attribute/Handlers/demo/demo2.pl
new file mode 100755 (executable)
index 0000000..387ab44
--- /dev/null
@@ -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 (executable)
index 0000000..6760fc0
--- /dev/null
@@ -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 (executable)
index 0000000..22d9fd9
--- /dev/null
@@ -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) { }