This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cpanm (App::cpanminus) 1.7001 on perl 5.018002 built for i686-linux-gnu-thread-multi-64int | |
| Work directory is /root/.cpanm/work/1467139323.24978 | |
| You have make /usr/bin/make | |
| You have LWP 6.05 | |
| You have /bin/tar: tar (GNU tar) 1.27.1 | |
| Copyright (C) 2013 Free Software Foundation, Inc. | |
| License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. | |
| This is free software: you are free to change and redistribute it. | |
| There is NO WARRANTY, to the extent permitted by law. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =head2 method ACCEPTS | |
| Defined as: | |
| method ACCEPTS($other) returns Bool:D | |
| Used in smart-matching if the right-hand side is a C<Baggy>. | |
| If the right hand side is the type object, i.e. C<Baggy>, the method | |
| returns C<True> if C<$other> L<does|/routine/does#class_Mu> C<Baggy> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =head2 method invert | |
| Defined as: | |
| method invert(Baggy:D:) returns Seq:D | |
| Returns all elements and their respective weights as a L<Seq|/type/Seq> of L<Pairs|/type/Pair>, | |
| where the element itself is the value and the weight of that element is the key, i.e. | |
| the opposite of method L<pairs|#method pairs>. Except for some esoteric cases C<invert> on a | |
| Baggy type returns the same result as L<antipairs|#method_antipairs>. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =head2 method Str | |
| method Str(Version:D:) returns Str:D | |
| Returns a string representation of the invocant. | |
| my $v1 = Version.new(v1.0.1+); | |
| my $v2 = Version.new('1.0.1+'); | |
| say $v1.Str; # 1.0.1+ | |
| say $v2.Str; # 1.0.1+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =head2 method keys | |
| Defined as: | |
| multi method keys(Capture:D:) returns Seq:D | |
| Usage: | |
| $capture.keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =head2 method pairs | |
| Defined as: | |
| multi method pairs(Capture:D:) returns Seq:D | |
| Usage: | |
| $capture.pairs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =head2 method has-phasers | |
| Defined as: | |
| method has-phasers() returns Int:D | |
| Returns C<1> if the block contains any L<phasers|/language/phasers> otherwise | |
| it returns C<0>. | |
| my $block = { ENTER { say "entering block"}; 42 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =head2 routine samemark | |
| multi sub samemark(Str:D $string, Str:D $pattern) returns Str:D | |
| method samemark(Str:D: Str:D $pattern) returns Str:D | |
| Returns a copy of C<$string> with the mark/accent information for each | |
| character changed such that it matches the mark/accent of the corresponding | |
| character in C<$pattern>. If C<$string> is longer than C<$pattern>, the | |
| remaining characters in C<$string> receive the same mark/accent as the last | |
| character in C<$pattern>. This means that C<$pattern> must contain at least |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # enable wrapping: | |
| use soft; | |
| # function to be wrapped: | |
| sub square-root($x) { $x.sqrt } | |
| &square-root.wrap(-> $num { | |
| nextsame if $num >= 0; | |
| 1i * callwith(abs($num)); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =head2 method Capture | |
| Defined as: | |
| method Capture() returns Capture:D | |
| Usage: | |
| LIST.Capture |