-
-
11 Apr 2021 19:09:54 UTC
- Distribution: Statocles
- Module version: 0.098
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (115)
- Testers (74 / 184 / 9)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.16.0
- Activity
24 month- Tools
- Download (484.85KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 16 contributors-
Andreas Voegele
-
Cthulhux
-
David Farrell
-
djerius
-
Ed J
-
Ferenc Erki
-
Joel Berger
-
Kent Fredric
-
Konrad Bucheli
-
Mohammad S Anwar
-
perlancar (@netbook-zenbook-ux305)
-
Roy Storey
-
tadegenban
-
Vladimir Lettiev
-
William Lindley
-
Wojtek Bażant
- Dependencies
- Beam::Emitter
- Beam::Wire
- DateTime::Moonpig
- Encode
- Encode::Locale
- File::Share
- Git::Repository
- I18N::Langinfo
- IPC::Open3
- Import::Base
- JSON::PP
- List::UtilsBy
- Mojolicious
- Moo
- Path::Tiny
- Pod::Simple
- Pod::Usage::Return
- Role::Tiny
- Text::Markdown
- Text::Unidecode
- Type::Tiny
- Types::Path::Tiny
- YAML
- strict
- warnings
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Statocles::Link - A link object to build <a> and <link> tags
VERSION
version 0.098
SYNOPSIS
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;
DESCRIPTION
This object encapsulates a link (either an
a
orlink
tag in HTML). These objects are friendly for templates and can provide some sanity checks.ATTRIBUTES
href
The URL location being linked to. Sets the
href
attribute.text
The text inside the link tag. Only useful for <a> links.
title
The title of the link. Sets the
title
attribute.rel
The relationship of the link. Sets the
rel
attribute.type
The MIME type of the resource being linked to. Sets the
type
attribute forlink
tags.METHODS
new_from_element
my $link = Statocles::Link->new_from_element( $dom_elem );
Construct a new Statocles::Link out of a Mojo::DOM element (either an <a> or a <link>).
AUTHOR
Doug Bell <preaction@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 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.
Module Install Instructions
To install Statocles, copy and paste the appropriate command in to your terminal.
cpanm Statocles
perl -MCPAN -e shell install Statocles
For more information on module installation, please visit the detailed CPAN module installation guide.