Acme-CPANModulesBundle-Import-MojoliciousAdvent-2018

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    Holder, and derivatives of that collection of files created through
    textual modification. 
  - "Standard Version" refers to such a Package if it has not been modified,
    or has been modified in accordance with the wishes of the Copyright
    Holder. 
  - "Copyright Holder" is whoever is named in the copyright or copyrights for
    the package. 
  - "You" is you, if you're thinking about copying or distributing this Package.
  - "Reasonable copying fee" is whatever you can justify on the basis of media
    cost, duplication charges, time of people involved, and so on. (You will
    not be required to justify it to the Copyright Holder, but only to the
    computing community at large as a market that must bear the fee.) 
  - "Freely Available" means that no fee is charged for the item itself, though
    there may be fees involved in handling the item. It also means that
    recipients of the item may redistribute it under the same conditions they
    received it. 

1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.

devdata/https_mojolicious.io_blog_2018_12_03_higher-order-promises_  view on Meta::CPAN

my @urls = ( ... );
my @all_sites = map { $ua->get_p( $_ ) } @urls;
my $all_promise = Mojo::Promise
  ->all( @all_sites )
  ->then(
    sub { say "They all worked!" },
    sub { say "One of them didn't work!" }
    );
</code></pre>

<p>The Promises aren&#39;t required to do their work in any order, though, so don&#39;t base your work on that.</p>

<h3>First come, first served</h3>

<p>A &quot;race&quot; resolves when the first Promise is no longer pending and after that doesn&#39;t need the other Promises to keep working.</p>

<pre><code>use Mojo::Promise;
use Mojo::UserAgent;
my $ua = Mojo::UserAgent-&gt;new;

my @urls = ( ... );

devdata/https_mojolicious.io_blog_2018_12_07_openapi_  view on Meta::CPAN

    # Document what the parameter is. This example uses the YAML HEREDOC
    # syntax to make the description easier to read and write.
    description: |
      The query search term. If the search term contains a term with the
      tags `dist:` or `module:` results will be in expanded form, otherwise
      collapsed form.

      See also `collapsed`
    # The type of the value that the API accepts
    type: string
    # Define the attribute as required
    required: true
  # The rest of the parameters that the API accepts
  - name: from
    in: query
    description: The offset to use in the result set
    type: integer
    # If the API applies a default to an attribute if it isn&#39;t specified.
    # Let the us know what it is.
    default: 0
  - name: size
    in: query



( run in 0.419 second using v1.01-cache-2.11-cpan-0a6323c29d9 )