Acme-CPANModulesBundle-Import-MojoliciousAdvent-2017
view release on metacpan or search on metacpan
"Data::Dumper" : "0",
"Dist::Zilla" : "0",
"Dist::Zilla::Plugin::ShareDir" : "0",
"ExtUtils::MakeMaker" : "0",
"File::Share" : "0",
"File::ShareDir" : "0",
"File::ShareDir::Install" : "0",
"FindBin" : "0",
"Galileo" : "0",
"GraphQL" : "0",
"IO::Socket::SSL" : "0",
"JSON::Validator" : "0",
"LinkEmbedder" : "0",
"List::UtilsBy" : "0",
"Minion" : "0",
"Mock::MonkeyPatch" : "0",
"Module::Build" : "0",
"Module::Build::Tiny" : "0",
"Mojo::Asset::File" : "0",
"Mojo::Autobox" : "0",
"Mojo::Base" : "0",
devdata/https_mojolicious.io_blog_2017_12_05_day-5-your-apps-built-in-commands view on Meta::CPAN
<p>You can also create a <a href="http://mojolicious.org/perldoc/Mojolicious/Command/generate/plugin">plugin project</a> or <a href="http://mojolicious.org/perldoc/Mojolicious/Command/generate/makefile">generate a Makefile</a>.</p>
<p>There is some more to say on the subject of file generation, but since this is an overview post, I'll leave it at that for now.</p>
<h3>The version Command</h3>
<p>The <a href="http://mojolicious.org/perldoc/Mojolicious/Command/version"><code>version</code></a> command is a simple utility to check your Mojolicious installation.</p>
<p>It outputs your current version of Perl and Mojolicious along with any installed optional libraries.
For example, you'll want to install <a href="https://metacpan.org/pod/IO::Socket::SSL">IO::Socket::SSL</a> if you want to fetch or serve sites over HTTPS.
It then checks to see if there is an updated version of Mojolicious available.</p>
<h3>The routes Command</h3>
<p>Once you started writing your application, you might want to introspect it a little bit, especially for debugging purposes.
The most straightforward command of that nature is <a href="http://mojolicious.org/perldoc/Mojolicious/Command/routes"><code>routes</code></a>.
Simply run it on your app to see what routes you have defined.</p>
<p>For example, we can run it on Santa's application from <a href="/blog/2017/12/03/day-3-using-named-routes">day 3</a>.</p>
devdata/https_mojolicious.io_blog_2017_12_05_day-5-your-apps-built-in-commands view on Meta::CPAN
<p>Now we're getting to the fun stuff!</p>
<p>Mojolicious comes with a <a href="http://mojolicious.org/perldoc/Mojo/UserAgent">user agent</a> and lots of post-processing power, including <a href="http://mojolicious.org/perldoc/Mojo/DOM">HTML/XML</a> and <a href="http://mojolicious.org/perldoc...
This command exposes those features together on the command line, like a smart version of cURL or wget.</p>
<p>Output is written to STDOUT so that you can redirect the result to a file if you'd like.
Because of that, headers are omitted from the output unless you pass <code>-v</code>.</p>
<p>Let's see what it can do!
You can find the latest version of <code>IO::Socket::SSL</code> using the <a href="https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md">Meta::CPAN JSON API</a>.
The response is parsed as JSON and only the <code>version</code> element is output.</p>
<pre><code>mojo get https://fastapi.metacpan.org/v1/module/IO::Socket::SSL /version
</code></pre>
<p>You can fetch the Perl headlines from reddit.
To do so we fetch the url (following redirects with <code>-r</code>), then we give it a <a href="http://mojolicious.org/perldoc/Mojo/DOM/CSS">CSS3 selector</a>, and finally extract the text from each found element.</p>
<pre><code>mojo get -r reddit.com/r/perl 'p.title > a.title' text
</code></pre>
<p>How fun is that?!</p>
lib/Acme/CPANModules/Import/MojoliciousAdvent/2017.pm view on Meta::CPAN
package Acme::CPANModules::Import::MojoliciousAdvent::2017;
our $DATE = '2018-12-30'; # DATE
our $VERSION = '0.001'; # VERSION
our $LIST = {description=>"This list is generated by extracting module names mentioned in [https://mojolicious.io/page/advent/2017/] (retrieved on 2018-12-30). Visit the URL for the full contents.",entries=>[{module=>"App::cpanminus"},{module=>"Mojo:...
1;
# ABSTRACT: Modules mentioned in Mojolicious Advent Calendar 2017
__END__
=pod
=encoding UTF-8
lib/Acme/CPANModules/Import/MojoliciousAdvent/2017.pm view on Meta::CPAN
=item * L<Mojolicious::Types>
=item * L<Mojo::URL>
=item * L<Mojolicious::Plugin::TagHelpers>
=item * L<Mojolicious::Command::inflate>
=item * L<Mojolicious::Lite>
=item * L<IO::Socket::SSL>
=item * L<Mojo::DOM>
=item * L<Mojo::DOM::CSS>
=item * L<Mojo::JSON>
=item * L<Mojo::Pg>
=item * L<Mojo::UserAgent>
lib/Acme/CPANModules/Import/MojoliciousAdvent/2017_12_05.pm view on Meta::CPAN
package Acme::CPANModules::Import::MojoliciousAdvent::2017_12_05;
our $DATE = '2018-12-30'; # DATE
our $VERSION = '0.001'; # VERSION
our $LIST = {description=>"This list is generated by extracting module names mentioned in [https://mojolicious.io/blog/2017/12/05/day-5-your-apps-built-in-commands] (retrieved on 2018-12-30). Visit the URL for the full contents.",entries=>[{module=>"...
1;
# ABSTRACT: Modules mentioned in Mojolicious Advent Calendar 2017 (day 05)
__END__
=pod
=encoding UTF-8
lib/Acme/CPANModules/Import/MojoliciousAdvent/2017_12_05.pm view on Meta::CPAN
This module is generated by extracting module names mentioned in L<https://mojolicious.io/blog/2017/12/05/day-5-your-apps-built-in-commands> (retrieved on 2018-12-30). Visit the URL for the full contents.
Modules mentioned in Mojolicious Advent Calendar 2017 (day 05).
This list is generated by extracting module names mentioned in [https://mojolicious.io/blog/2017/12/05/day-5-your-apps-built-in-commands] (retrieved on 2018-12-30). Visit the URL for the full contents.
=head1 INCLUDED MODULES
=over
=item * L<IO::Socket::SSL>
=item * L<Mojo::DOM>
=item * L<Mojo::DOM::CSS>
=item * L<Mojo::JSON>
=item * L<Mojo::Pg>
=item * L<Mojo::UserAgent>
( run in 0.304 second using v1.01-cache-2.11-cpan-4d50c553e7e )