BusyBird-Input-Feed
view release on metacpan or search on metacpan
t/samples/rtcpan.rdf view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
>
<channel rdf:about="https://rt.cpan.org/">
<title>rt.cpan.org: Search Queue = 'future'</title>
<link>https://rt.cpan.org/</link>
<description></description>
<syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
<syn:updateFrequency>1</syn:updateFrequency>
<syn:updatePeriod>hourly</syn:updatePeriod>
<items>
<rdf:Seq>
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=84118" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=84187" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=84188" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=84189" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=84312" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=84313" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=85134" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=88967" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=89185" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=91147" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=92525" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=93164" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=94040" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=96409" />
<rdf:li rdf:resource="https://rt.cpan.org/Ticket/Display.html?id=96685" />
</rdf:Seq>
</items>
</channel>
<item rdf:about="https://rt.cpan.org/Ticket/Display.html?id=84118">
<title>I really beg you to take back the exception catching feature in Future 0.11</title>
<link>https://rt.cpan.org/Ticket/Display.html?id=84118</link>
<description>I really beg you to take back the new feature in Future 0.11, in which
exceptions are caught by Future in followed_by(), and_then() and
or_else() callbacks.
This is because it can unintensionally hide critical errors and lead
to hard-to-solve bugs.
Suppose I use a function from someone's module.
package Someones::Module;
sub bad_func {
die __PACKAGE__ . ": something bad happened.";
}
It is often the case that a function throws an exception in some cases.
And sometimes it is NOT EVEN DOCUMENTED.
Then, when I use it in Future's callback,
package main;
my $start = Future->new;
$start->and_then(sub {
my ($arg) = shift->get;
my $result = Someones::Module::bad_func($arg);
print "We get the result: $result";
return Future->new->done($result);
});
$start->done('a');
with Future 0.11, the above code prints nothing. If I didn't read
Future's documentation from page to page, I would have no idea what's
going on.
The thrown exception lives in the sense that it makes the resulting
future fail. However, the failed future can be easily ignored unless
the user has explicit intension to check errors. I believe errors as
important as exceptions must be visible regardless of the user's
intension or carefulness.
Therefore, I really beg you to take back the exception catching
feature in Future 0.11.
</description>
<dc:creator>TOSHIOITO@cpan.org</dc:creator>
<dc:date>Thu, 21 Mar 2013 12:36:07 +0000</dc:date>
</item>
<item rdf:about="https://rt.cpan.org/Ticket/Display.html?id=84187">
<title>needs_all() throws an exception when immediate failed subfutures are given</title>
<link>https://rt.cpan.org/Ticket/Display.html?id=84187</link>
<description>Future->needs_all(@subfutures) method throws an exception when
immediate failed Futures are included in @subfutures.
Future->needs_all() should accept immediate failed subfutures without
exceptions.
I ran the following test:
use strict;
use warnings;
use Test::More;
use Future 0.11;
foreach my $method (qw(wait_all wait_any needs_all needs_any)) {
foreach my $done_first (0,1) {
my $msg = "$method, done_first = $done_first";
my @done_subs = map { Future->new->done($_) } 1..5;
my @fail_subs = map { Future->new->fail("failure $_") } 1..5;
my @subs = $done_first
? (@done_subs, @fail_subs)
: (@fail_subs, @done_subs);
my $f = eval {
Future->$method(@subs);
pass($msg);
};
if($@) {
fail($msg);
diag("Exception: $@");
}
}
}
done_testing();
Then the result was:
ok 1 - wait_all, done_first = 0
ok 2 - wait_all, done_first = 1
ok 3 - wait_any, done_first = 0
ok 4 - wait_any, done_first = 1
not ok 5 - needs_all, done_first = 0
# Failed test 'needs_all, done_first = 0'
# at test.pl line 19.
# Exception: failure 1 at test.pl line 15.
not ok 6 - needs_all, done_first = 1
# Failed test 'needs_all, done_first = 1'
# at test.pl line 19.
# Exception: failure 1 at test.pl line 15.
ok 7 - needs_any, done_first = 0
ok 8 - needs_any, done_first = 1
1..8
# Looks like you failed 2 tests of 8.
</description>
<dc:creator>TOSHIOITO@cpan.org</dc:creator>
<dc:date>Mon, 25 Mar 2013 05:09:05 +0000</dc:date>
</item>
<item rdf:about="https://rt.cpan.org/Ticket/Display.html?id=84188">
<title>Error message is not user-friendly for followed_by(), and_then(), or_else() and repeat()</title>
<link>https://rt.cpan.org/Ticket/Display.html?id=84188</link>
<description>I often forget to return a Future in the callback for followed_by(),
and_then() or or_else() method, especially when I just mean to provide
other parts of my program with a way to chain further callbacks.
In this case, the error message should be more user-friendly.
Example:
use Future 0.11;
my $f = Future->new;
$f->and_then(sub {
do_something(shift->get); ## this does not return anything
});
$f->done("result");
Current error message:
Can't call method "on_ready" on an undefined value at /usr/local/share/perl/5.14.2/Future.pm line 223.
Should be like:
You must return a Future from and_then callback at your_script.pl line XXX.
The same applies to Future::Utils::repeat function.
Example:
my $ef = Future::Utils::repeat {
do_something();
} while => sub { 0 };
Current error message:
Can't call method "new" on an undefined value at /usr/local/share/perl/5.14.2/Future/Utils.pm line 181.
</description>
<dc:creator>TOSHIOITO@cpan.org</dc:creator>
<dc:date>Mon, 25 Mar 2013 05:10:30 +0000</dc:date>
</item>
<item rdf:about="https://rt.cpan.org/Ticket/Display.html?id=84189">
<title>Behavior of repeat {...} foreach => [] may be counter-intuitive</title>
<link>https://rt.cpan.org/Ticket/Display.html?id=84189</link>
<description>When Future::Utils::repeat() function is called with foreach => []
option, the CODE block is executed once with undef value given as the
$item.
Because this behavior may be counter-intuitive for users, it should at
least be documented.
Example:
use Future;
use Future::Utils qw(repeat);
use Data::Dumper;
repeat {
my $item = shift;
print Dumper $item;
return Future->new->done($item);
} foreach => [];
( run in 2.011 seconds using v1.01-cache-2.11-cpan-99c4e6809bf )