Group
Extension

Matches 1

Async-Chain ( R/RE/REZNIKOV/Async-Chain-0.05.tar.gz, REZNIKOV, 2014; MetaCPAN )
Async-Chain/ex/exp2.pl ( view source; MetaCPAN )
strict;
use warnings;
use Async::Chain;
use AnyEvent;
use AnyEvent::Loop;
use AnyEvent::HTTP;
use JSON;

use Data::Dumper;

my %state;
chain
	sub {
		my $next = shift;
		http_get(
			'http://api.metac
=1',
			$next
		);
	},
	sub {
		my $next = shift;
		my ($body, $headers) = @_;
		%state = %{ from_json($body)->{hits}->{hits}->[0]->{fields} };
		http_get "http://api.metacpan.org/v0/author/$state{aut
me", $next;
	},
	sub {
		my $next = shift;
		my ($body, $headers) = @_;
		$state{realname} = from_json($body)->{name};
		printf "%s (aka %s) release %s at %s\n", $state{realname}, $state{author}, $sta

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.