Acme-CPANModulesBundle-Import-MojoliciousAdvent-2017
view release on metacpan or search on metacpan
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>
<pre><code>$ perl santa.pl routes
( run in 0.252 second using v1.01-cache-2.11-cpan-05444aca049 )