Skip to content

Commit c8f953e

Browse files
author
Jan-Olof Hendig
committed
Added code examples to methods parts and plus
1 parent c79e637 commit c8f953e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/Type/Version.pod6

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,22 @@ numeric and alphabetic characters.
4646
4747
Returns the list of parts that make up this Version object
4848
49+
my $v1 = v1.0.1;
50+
my $v2 = v1.0.1+;
51+
say $v1.parts; # (1 0 1)
52+
say $v2.parts; # (1 0 1)
53+
4954
=head2 method plus
5055
5156
method plus(Version:D:) returns Bool:D
5257
5358
Returns C<True> if comparisons against this version allow larger versions too.
5459
60+
my $v1 = v1.0.1;
61+
my $v2 = v1.0.1+;
62+
say $v1.plus; # False
63+
say $v2.plus; # True
64+
5565
=head2 method Str
5666
5767
method Str(Version:D:) returns Str:D

0 commit comments

Comments
 (0)