Group
Extension

Matches 5

Promises ( Y/YA/YANICK/Promises-1.05.tar.gz, YANICK, 2025; MetaCPAN )
Promises/lib/Promises.pm ( view source; MetaCPAN )
ses in Perl

=head1 VERSION

version 1.05

=head1 SYNOPSIS

  use AnyEvent::HTTP;
  use JSON::XS qw[ decode_json ];
  use Promises qw[ collect deferred ];

  sub fetch_it {
      my ($uri) = @_;
     
y ($body, $headers) = @_;
          $headers->{Status} == 200
              ? $d->resolve( decode_json( $body ) )
              : $d->reject( $body )
      };
      $d->promise;
  }

  my $cv = AnyEve
Promises ( Y/YA/YANICK/Promises-1.05.tar.gz, YANICK, 2025; MetaCPAN )
Promises/lib/Promises/Cookbook/ChainingAndPipelining.pod ( view source; MetaCPAN )
a list of users whose access level is 'admin', in
our fictional web-service we get back a list of JSON objects with
only minimal information, just a user_id and full_name for instance.
From here we ca
Promises ( Y/YA/YANICK/Promises-1.05.tar.gz, YANICK, 2025; MetaCPAN )
Promises/lib/Promises/Cookbook/GentleIntro.pod ( view source; MetaCPAN )
For
instance:

    use Promises qw(deferred);
    use AnyEvent::HTTP qw(http_get);
    use JSON qw(decode_json);

    sub fetch_it {
        my ($uri) = @_;
        my $deferred = deferred;
        ht
headers) = @_;
            $headers->{Status} == 200
                ? $deferred->resolve( decode_json($body) )
                : $deferred->reject( $headers->{Reason} )
        };
        $deferred->
Promises ( Y/YA/YANICK/Promises-1.05.tar.gz, YANICK, 2025; MetaCPAN )
Promises/lib/Promises/Cookbook/SynopsisBreakdown.pod ( view source; MetaCPAN )
of Promises

=head1 VERSION

version 1.05

=head1 SYNOPSIS

  use AnyEvent::HTTP;
  use JSON::XS qw[ decode_json ];
  use Promises qw[ collect deferred ];

  sub fetch_it {
      my ($uri) = @_;
     
y ($body, $headers) = @_;
          $headers->{Status} == 200
              ? $d->resolve( decode_json( $body ) )
              : $d->reject( $body )
      };
      $d->promise;
  }

  my $cv = AnyEve
y ($body, $headers) = @_;
          $headers->{Status} == 200
              ? $d->resolve( decode_json( $body ) )
              : $d->reject( $body )
      };
      $d->promise;
  }

First is the C<fe
Promises ( Y/YA/YANICK/Promises-1.05.tar.gz, YANICK, 2025; MetaCPAN )
Promises/lib/Promises/Deferred.pm ( view source; MetaCPAN )
y ($body, $headers) = @_;
          $headers->{Status} == 200
              ? $d->resolve( decode_json( $body ) )
              : $d->reject( $body )
      };
      $d->promise;
  }

=head1 DESCRIPTIO

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