Skip to content

Commit c8b95f8

Browse files
committed
Document X::Bind:Slice
1 parent da3d564 commit c8b95f8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

lib/Type/X/Bind/Slice.pod

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
=begin pod
2+
3+
=TITLE class X::Bind::Slice
4+
5+
=SUBTITLE Exception thrown when trying to bind to a slice
6+
7+
class X::Bind::Slice is Exception { ... }
8+
9+
When you try to bind to an array or hash slice:
10+
11+
my @a; @a[0, 1] := [42]; # Cannot bind to Array slice
12+
my %h; %h<a b> := {}; # Cannot bind to Hash slice
13+
14+
you get an exception of type X<::Bind::Slice>
15+
16+
=head1 Methods
17+
18+
=head2 method type
19+
20+
method type(X::Bind::Slice:D:)
21+
22+
returns the type object of the thing that you tried to slice-bind, for example
23+
L<Array|/type/Array>, L<List|/type/List> or L<Hash|/type/Hash>.
24+
25+
=end pod

0 commit comments

Comments
 (0)