This file contains 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
zoffix@ZofMain:~/Desktop/CPANPRC/doc$ gd | |
diff --git a/lib/Language/5to6.pod b/lib/Language/5to6.pod | |
index 9498dc1..0d7176a 100644 | |
--- a/lib/Language/5to6.pod | |
+++ b/lib/Language/5to6.pod | |
@@ -759,6 +759,17 @@ Instead, use a C<NEXT> block within the body of the loop. | |
=comment NOTE FOR EDITORS: When adding functions, please place them in | |
alphabetical order. | |
+=head3 Built-ins with bare blocks |
This file contains 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
class Employee { | |
subset Salary of Real where * > 0; | |
subset NonEmptyString of Str where * ~~ /\S/; # at least one non-space character | |
has NonEmptyString $.name is rw; | |
has NonEmptyString $.surname is rw; | |
has Salary $.salary is rw; | |
method gist { | |
return qq:to[END]; |
This file contains 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
zoffix@ZofMain:/tmp$ time perl -MMojo::DOM -wlE 'say Mojo::DOM->new("<foo><bar>baz</bar></foo>")->at("bar")->all_text' | |
baz | |
real 0m0.041s | |
user 0m0.032s | |
sys 0m0.008s | |
zoffix@ZofMain:/tmp$ time perl6 -MInline::Perl5 -e 'use Mojo::DOM:from<Perl5>; say Mojo::DOM.new("<foo><bar>baz</bar></foo>").at("bar").all_text' | |
baz | |
real 0m3.935s |
This file contains 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
fsdfdsfsdfsdfsdfsdfsd |
This file contains 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
foo |
This file contains 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
use v6; | |
sub rgb2hsl ( $r is copy, $g is copy, $b is copy ) { | |
$_ /= 255 for $r, $g, $b; | |
# Formula cortesy http://www.rapidtables.com/convert/color/rgb-to-hsl.htm | |
my $c_max = max $r, $g, $b; | |
my $c_min = min $r, $g, $b; | |
my \Δ = $c_max - $c_min; |
This file contains 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
[Sat Nov 21 17:36:55 2015] [info] Starting build /G0BXqCQ5RGhLItaqX5EiQ== | |
[Sat Nov 21 17:36:55 2015] [info] Using database file modulesperl6.db | |
[Sat Nov 21 17:36:55 2015] [info] Cleaning up dist logos dir [public/content-pics/dist-logos] | |
[Sat Nov 21 17:36:55 2015] [info] Loading META.list from https://raw.githubusercontent.com/perl6/ecosystem/master/META.list | |
[Sat Nov 21 17:36:55 2015] [info] ... a URL detected; trying to fetch | |
[Sat Nov 21 17:36:55 2015] [info] Found 461 dists | |
[Sat Nov 21 17:36:55 2015] [info] Processing dist 1 of 461 | |
[Sat Nov 21 17:36:55 2015] [info] Using DbBuilder::Dist::Source::GitHub to load https://raw.githubusercontent.com/tadzik/perl6-Acme-Meow/master/META.info | |
[Sat Nov 21 17:36:55 2015] [info] Downloading META file from https://raw.githubusercontent.com/tadzik/perl6-Acme-Meow/master/META.info | |
[Sat Nov 21 17:36:55 2015] [info] Parsing META file |
This file contains 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
use v6; | |
my $chan = '#perl6'; | |
await IO::Socket::Async.connect('irc.freenode.net',6667).then( -> $p { | |
my $sock = $p.result; | |
$sock.print("NICK P6\nUSER P6 Perl6 work :Perl6 Perl6\nJOIN $chan\n"); | |
my $timer = Promise.in(5).then({ now }); | |
react { | |
whenever $timer -> $now { | |
say "Now is $now\n"; | |
$sock.print: ":P6!P6\@work PRIVMSG $chan :Now is $now\n"; |
This file contains 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
use v6; | |
my $chan = '#zofbot'; | |
await IO::Socket::Async.connect('10.10.11.12',6667).then( -> $p { | |
my $sock = $p.result; | |
$sock.print("NICK P6\nUSER P6 Perl6 work :Perl6 Perl6\nJOIN $chan\n"); | |
react { | |
whenever $sock.chars-supply() -> $v is copy { | |
$v.say; | |
if ( $v ~~ /':End of NAMES list'/ ) { | |
Supply.interval(5).tap({ |
This file contains 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
use v6; | |
my $chan = '#perl6'; | |
await IO::Socket::Async.connect('irc.freenode.net',6667).then( -> $p { | |
my $sock = $p.result; | |
$sock.print("NICK P6\nUSER P6 Perl6 work :Perl6 Perl6\nJOIN $chan\n"); | |
react { | |
whenever $sock.chars-supply() -> $v is copy { | |
$v.say; | |
if ( $v ~~ /':End of NAMES list'/ ) { | |
Supply.interval(5).tap({ |
OlderNewer