subtype MyArrayRefBase,
as ArrayRef;
-
+
coerce MyArrayRefBase,
from Str,
via {[split(',', $_)]};
-
+
subtype MyArrayRefInt01,
as ArrayRef[Int];
subtype BiggerInt,
as Int,
where {$_>10};
-
+
subtype SubOfMyArrayRefInt01,
as MyArrayRefInt01[BiggerInt];
via {[split('\.',$_)]},
from HashRef,
via {[sort values(%$_)]};
-
+
subtype MyArrayRefInt02,
as MyArrayRefBase[Int];
-
+
subtype MyHashRefOfInts,
as HashRef[Int];
-
+
subtype MyHashRefOfStr,
as HashRef[Str];
subtype AtLeastOneInt,
as ArrayRef[Int],
where { @$_ > 0 };
-
+
enum Jobs,
(qw/Programming Teaching Banking/);
-
+
subtype isFive,
as Int,
where { $_ == 5};
subtype isTen,
as Int,
where { $_ == 10};
-
+
subtype isFifteen,
as Int,
where { $_ == 15};
-
+
subtype VeryBigInt,
as BiggerInt,
where {$_>100};
-
+
subtype FiveOrTenOrFifteen,
as isFive|isTen|isFifteen;
as ArrayRef[FiveOrTenOrFifteen|VeryBigInt];
subtype WierdIntegersArrayRef2,
- as ArrayRef[FiveOrTenOrFifteen|Object];
+ as ArrayRef[FiveOrTenOrFifteen|Object];
1;