Created
February 1, 2017 17:53
-
-
Save anonymous/1bac642c0a774065bb087dab4e03c694 to your computer and use it in GitHub Desktop.
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
[jdv@new-host-2 p6-agent]$ cat t/99-test.t | |
use v6; | |
role Agent { | |
has Str $.id is required; | |
has $.state = {}; | |
method !foo { $!state } | |
} | |
role Agent::WebSourceAgent { | |
method send-and-store { for (:k1<v1>) { if self!foo { } } } | |
} | |
class Agent::AtomAgent does Agent does Agent::WebSourceAgent { | |
method run { loop { self.send-and-store } } | |
} | |
class Agent::FeedBurnerAgent does Agent does Agent::WebSourceAgent { | |
method run { loop { self.send-and-store } } | |
} | |
await map { start { | |
CATCH { default { die "E:{$_.gist}:E"; exit; } }; | |
$_ mod 2 | |
?? Agent::AtomAgent.new(:id("a-$_")).run | |
!! Agent::FeedBurnerAgent.new(:id("f-$_")).run; | |
} }, 1..50; | |
# vim:ft=perl6 | |
[jdv@new-host-2 p6-agent]$ time perl6 t/99-test.t | |
Tried to get the result of a broken Promise | |
in block <unit> at t/99-test.t line 22 | |
Original exception: | |
E:P6opaque: no such attribute '$!state' in type Agent::FeedBurnerAgent when trying to get a value | |
in method foo at t/99-test.t line 7 | |
in method send-and-store at t/99-test.t line 11 | |
in method run at t/99-test.t line 15 | |
in block at t/99-test.t line 24 | |
:E | |
in block at t/99-test.t line 23 | |
in method send-and-store at t/99-test.t line 11 | |
in method run at t/99-test.t line 15 | |
in block at t/99-test.t line 24 | |
real 0m0.541s | |
user 0m0.974s | |
sys 0m0.068s | |
[jdv@new-host-2 p6-agent]$ time perl6 t/99-test.t | |
^C | |
real 1m13.959s | |
user 4m51.781s | |
sys 0m0.195s | |
[jdv@new-host-2 p6-agent]$ time perl6 t/99-test.t | |
^C | |
real 0m22.663s | |
user 1m27.439s | |
sys 0m0.459s | |
[jdv@new-host-2 p6-agent]$ time perl6 t/99-test.t | |
Tried to get the result of a broken Promise | |
in block <unit> at t/99-test.t line 22 | |
Original exception: | |
E:P6opaque: no such attribute '$!state' in type Agent::FeedBurnerAgent when trying to get a value | |
in method foo at t/99-test.t line 7 | |
in method send-and-store at t/99-test.t line 11 | |
in method run at t/99-test.t line 15 | |
in block at t/99-test.t line 24 | |
:E | |
in block at t/99-test.t line 23 | |
in method send-and-store at t/99-test.t line 11 | |
in method run at t/99-test.t line 15 | |
in block at t/99-test.t line 24 | |
real 0m0.756s | |
user 0m1.280s | |
sys 0m0.110s | |
[jdv@new-host-2 p6-agent]$ time perl6 t/99-test.t | |
^C | |
real 0m19.591s | |
user 1m15.996s | |
sys 0m0.464s | |
[jdv@new-host-2 p6-agent]$ time perl6 t/99-test.t | |
Use of uninitialized value $s of type Any in string context. | |
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. | |
in block at t/99-test.t line 23 | |
Tried to get the result of a broken Promise | |
in block <unit> at t/99-test.t line 22 | |
Original exception: | |
E:P6opaque: no such attribute '$!state' in type Agent::FeedBurnerAgent when trying to get a value | |
in method foo at t/99-test.t line 7 | |
in method send-and-store at t/99-test.t line 11 | |
in method run at t/99-test.t line 15 | |
in block at t/99-test.t line 24 | |
:E | |
in block at t/99-test.t line 23 | |
in method send-and-store at t/99-test.t line 11 | |
in method run at t/99-test.t line 15 | |
in block at t/99-test.t line 24 | |
real 0m0.692s | |
user 0m1.159s | |
sys 0m0.091s | |
[jdv@new-host-2 p6-agent]$ time perl6 t/99-test.t | |
Tried to get the result of a broken Promise | |
in block <unit> at t/99-test.t line 22 | |
Original exception: | |
E:P6opaque: no such attribute '$!state' in type Agent::FeedBurnerAgent when trying to get a value | |
in method foo at t/99-test.t line 7 | |
in method send-and-store at t/99-test.t line 11 | |
in method run at t/99-test.t line 15 | |
in block at t/99-test.t line 24 | |
:E | |
in block at t/99-test.t line 23 | |
in method send-and-store at t/99-test.t line 11 | |
in method run at t/99-test.t line 15 | |
in block at t/99-test.t line 24 | |
real 0m0.512s | |
user 0m0.854s | |
sys 0m0.081s | |
[jdv@new-host-2 ~]$ perl6 -v | |
This is Rakudo version 2016.12-377-g7ddc5f7 built on MoarVM version 2016.12-113-gd1da1ba | |
implementing Perl 6.c. | |
[jdv@new-host-2 ~]$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment