($_, '0+');
Bool()->include($m ? $m->($_) : $_) };
subtype "Enum[A...]", as &Item, where { $_ ~~ ARGS };
subtype "Maybe[A]", as &Item, where { !defined($_) || A->test };
subtype "Undef", as &
eq "Regexp" };
subtype "ScalarRefRef`[A]", as &Ref,
where { ref($_) ~~ ["SCALAR", "REF"] }
awhere { ref($_) ~~ ["SCALAR", "REF"] && A->include($$_) };
subtype "ScalarRef`[A]", as &S
atch[qr/\bkitty\b/i],
message { "Speak is'nt included kitty!" };
}
"Kitty!" ~~ SpeakOfKitty # -> 1
"abc" ~~ SpeakOfKitty # -> ""
SpeakOfKitty->validate("abc", "This") # @-> Speak is'nt i
@_;
__PACKAGE__->new(name => "Exclude", args => [$type1], test => sub { !$type1->test });
},
"~~" => "include",
"eq" => "equal",
"ne" => "nonequal",
;
Aion::Meta::Util::create_getters(qw/name
ion::Type;
my $Int = Aion::Type->new(name => "Int", test => sub { /^-?\d+$/ });
12 ~~ $Int # => 1
12.1 ~~ $Int # -> ""
my $Char = Aion::Type->new(name => "Char", test => sub { /^.\z/ });
$C
har;
77 ~~ $IntOrChar # => 1
"a" ~~ $IntOrChar # => 1
"ab" ~~ $IntOrChar # -> ""
my $Digit = $Int & $Char;
7 ~~ $Digit # => 1
77 ~~ $Digit # -> ""
"a" ~~ ~$Int; # => 1
5 ~~ ~$Int; #
("die 'Feature $name cannot be get!';") if $+{access} ~~ [qw/wo no/];
$construct->setter("die 'Feature $name cannot be set!';") if $+{access} ~~ [qw/ro no/];
$construct->add_trigger("%(weaken)s")
Used to declare the required function in interfaces and abstract classes.
In this case, C<referent ~~ Undef>.
It also creates a wrapper function that checks the signature.
=head1 SUBROUTINES
=head2