Skip to content

Commit 5ac359a

Browse files
committed
add example of a trait with a where clause
1 parent 3a2609a commit 5ac359a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/Type/Signature.pod6

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,10 @@ C<Array> full of C<Scalar>s as described above, C<is raw> will instead cause
507507
the parameter to produce a C<List>. Each element of that list will be bound
508508
directly as raw parameter.
509509
510+
Traits can be followed by the where clause:
511+
512+
sub ip-expand-ipv6($ip is copy where m:i/^<[a..f\d\:]>**3..39$/) {...}
513+
510514
=head1 Methods
511515
512516
=head2 method params

0 commit comments

Comments
 (0)