Statocles::Link - A link object to build <a> and <link> tags
version 0.048
my $link = Statocles::Link->new( text => 'Foo', href => 'http://example.com' ); say $link->href; say $link->text; say sprintf '<a href="%s">%s</a>', $link->href, $link->text;
This object encapsulates a link (either an a or link tag in HTML). These objects are friendly for templates and can provide some sanity checks.
a
link
The URL location being linked to. Sets the href attribute.
href
The text inside the link tag. Only useful for <a> links.
The title of the link. Sets the title attribute.
title
The relationship of the link. Sets the rel attribute.
rel
The MIME type of the resource being linked to. Sets the type attribute for link tags.
type
Construct a new Statocles::Link out of a Mojo::DOM element (either an <a> or a <link>).
Doug Bell <preaction@cpan.org>
This software is copyright (c) 2015 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Statocles, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Statocles
CPAN shell
perl -MCPAN -e shell install Statocles
For more information on module installation, please visit the detailed CPAN module installation guide.