From: Jarkko Hietaniemi Date: Fri, 14 Dec 2001 23:33:28 +0000 (+0000) Subject: Mithing. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf1db89149923b1533a37c57e61360df21fa3679;p=p5sagit%2Fp5-mst-13.2.git Mithing. p4raw-id: //depot/perl@13692 --- diff --git a/lib/Attribute/Handlers/demo/demo2.pl b/lib/Attribute/Handlers/demo/demo2.pl new file mode 100755 index 0000000..387ab44 --- /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 0000000..6760fc0 --- /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 0000000..22d9fd9 --- /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) { }