HTML-TableContent

 view release on metacpan or  search on metacpan

t/Templates/CaptionHtml.pm  view on Meta::CPAN

package t::Templates::CaptionHtml;

use Moo;
use HTML::TableContent::Template;

caption title => (
    class => 'some-class',
    id => 'caption-id',
    text => 'table caption',
);

header id => (
    class => 'some-class',
    id => 'something-id',
);

header name => (
    class => 'okay',
);

header address => (
    class => 'what',
);

sub render_caption {
    my ($self, $element) = @_;

    return ['<a href="some/endpoint">%s</a>'];
}

sub _data {
    my $self = shift;

    return [
        {
            id => 1,
            name => 'rob',
            address => 'somewhere',
        },
        {
            id => 2,
            name => 'sam',
            address => 'somewhere else',
        },
        {
            id => 3,
            name => 'frank',
            address => 'out',
        },
    ];
}

1;





( run in 0.630 second using v1.01-cache-2.11-cpan-39bf76dae61 )