Examples

        <%= badge '3' %>

        <span class="badge">3</span></a>

A basic badge.

3

        <%= badge '4', data => { custom => 'yes' }, right %>

        <span class="badge pull-right" data-custom="yes">4</span>

A right aligned badge with a data attribute.

4

        %= badge 'Badge 2', right

        <span class="badge pull-right">Badge 2</span>

Badge 2

        % my $empty_badge = '';
        %= badge $empty_badge

A badge with undef value or empty string is not rendered.