Acme-CPANModulesBundle-Import-MojoliciousAdvent-2018

 view release on metacpan or  search on metacpan

devdata/https_mojolicious.io_blog_2018_12_05_compound-selectors_  view on Meta::CPAN

my @scores = Mojo::DOM->new( $html )
    ->find( 'table.scores > tr > td:last-child' )
    ->map( 'text' )
    ->each
    ;

my $grand = sum( @scores );
say "Grand total: $grand";
</code></pre>

<p><em style="font-size: 10px">
Editor&#39;s note: Unfortunately this example breaks our syntax highlighter. This is the site&#39;s fault not the author. We&#39;re trying to find a better way to render it short of rewriting the rendering engine.
</em></p>

<h2>Conclusion</h2>

<p>Even for an old programmer like me, dealing with HTML through CSS Selectors applied by Mojolicious is much easier than what I was doing before (which was dirty and much easier than doing it correctly). With a little skill creating compound selecto...

              </section>
              <small><p><a class="external text" href="https://www.flickr.com/photos/feuilllu/101083313/in/photolist-9W5xK-SWEcv6-qmMqBb-9W66e-umaBj-7Gkg2a-bnmWDf-jZPHK7-bAgNFi-bnmW3J-Hd8y3-dYNuYc-Hd9o9-22MW7qW-6qZWkL-7yzScF-24W5o6o-bBNUMi-5QPxcD-boz...
</small>

devdata/https_mojolicious.io_blog_2018_12_18_a-view-to-a-pod_  view on Meta::CPAN

    layout =&gt; &#39;default&#39;,
};
app-&gt;start;
__DATA__
@@ layouts/default.html.ep
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;link rel=&quot;stylesheet&quot; href=&quot;/yancy/bootstrap.css&quot;&gt;
        &lt;style&gt;
            h1 { font-size: 2.00rem }
            h2 { font-size: 1.75rem }
            h3 { font-size: 1.50rem }
            h1, h2, h3 {
                position: relative;
            }
            h1 .permalink, h2 .permalink, h3 .permalink {
                position: absolute;
                top: auto;
                left: -0.7em;
                color: #ddd;
            }
            h1:hover .permalink, h2:hover .permalink, h3:hover .permalink {
                color: #212529;
            }
            pre {
                border: 1px solid #ccc;
                border-radius: 5px;
                background: #f6f6f6;
                padding: 0.6em;
            }
            .crumbs .more {
                font-size: small;
            }
        &lt;/style&gt;
        &lt;title&gt;&lt;%= title %&gt;&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        %= content
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>



( run in 1.014 second using v1.01-cache-2.11-cpan-ceb78f64989 )