Skip to content

Commit 2d4de01

Browse files
committed
Adds clone and eqv, closes #2521
1 parent 293d187 commit 2d4de01

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/Type/Match.pod6

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ can be seen as the root of a tree of match objects.
5252
5353
=head1 Methods
5454
55+
=head2 method clone
56+
57+
Clones the C<Match> object.
58+
5559
=head2 method orig
5660
5761
Returns the original string that the regex was matched against.
@@ -174,6 +178,17 @@ The sub form operates on the current C<$/>, which can be a convenient shortcut:
174178
make "foo: $/";
175179
}
176180
181+
182+
=head2 method infix:<eqv>
183+
184+
Defined as:
185+
186+
multi sub infix:<eqv>(Match:D \a, Match:D \b)
187+
188+
Returns C<True> if the attributes C<pos>, C<from> and C<orig> are equal, and if
189+
C<made>, C<Capture::list> and C<Capture::hash> are either the same or both
190+
undefined.
191+
177192
=end pod
178193

179194
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)