Acme-CPANModulesBundle-Import-PerlDancerAdvent-2018
view release on metacpan or search on metacpan
devdata/http_advent.perldancer.org_2018_15 view on Meta::CPAN
<div class="pod-document"><h1><a name="dancer2__plugin__paginator___born_again"></a>Dancer2::Plugin::Paginator - Born Again</h1>
<h2><a name="history"></a>HISTORY</h2>
<p>I would call it re-birth. It all started during end of July 2017, I was going through the documentation of <a href="https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Plugins.pod">Dancer2::Plugins</a> and stumbled upon <a href="https://meta...
<h2><a name="rebirth"></a>REBIRTH</h2>
<p>Following the <a href="http://neilb.org/2014/01/31/adoption-request.html">advise</a> from Neil Bowers, I contacted the author <b>Blabos de Blebe</b> by email, if he was happy for me take it forward. He not only encouraged me but also gave me permi...
<h2><a name="challenge"></a>CHALLENGE</h2>
<p>After getting the push from the author, my first challenge was to make it compatible with <a href="https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Plugins.pod">Dancer2::Plugins</a>. Having done this with other plugins e.g. <a href="https...
<h2><a name="example"></a>EXAMPLE</h2>
<p>Let me show you an example as described in the official document for <a href="https://metacpan.org/release/Dancer2-Plugin-Paginator">Dancer2::Plugin::Paginator</a>.</p>
<pre class="prettyprint">use Dancer2;
use Dancer2::Plugin::Paginator;
get '/list' => sub {
my $paginator = paginator(
'curr' => $page,
'items' => rset('Post')->count,
devdata/http_advent.perldancer.org_2018_15 view on Meta::CPAN
next_l => $paginator->next,
};
}</pre>
<h3><a name="template"></a>Template</h3>
<pre class="prettyprint"><% IF results.size %>
<ul>
<% FOREACH book IN results %>
<% IF book.name %>
<li><b><% book.name %></b> &nbsp; <a href="/edit/book/<% book.id %>">Edit</a></li>
<% END %>
<% END %>
</ul>
<br/>
<hr/>
<a href="/books/<% prev_l %>">[prev]</a>...<a href="/books/<% next_l %>">[next]</a>
<hr/>
<% ELSE %>
<ul><li><b>No book found.</b></li></ul>
<% END %></pre>
( run in 0.413 second using v1.01-cache-2.11-cpan-de7293f3b23 )