Alex J. G. Burzyński > WWW-Sitemap-XML > WWW::Sitemap::XML::Types

Download:
WWW-Sitemap-XML-2.02.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 2.02   Source  

NAME ^

WWW::Sitemap::XML::Types - Type constraints used by WWW::Sitemap::XML and WWW::Sitemap::XML::URL

VERSION ^

version 2.02

DESCRIPTION ^

Type constraints used by WWW::Sitemap::XML and WWW::Sitemap::XML::URL.

TYPES ^

Location

    has 'loc' => (
        is => 'rw',
        isa => Location,
    );

URL location, coerced from Uri via { $_->as_string }.

ChangeFreq

    has 'changefreq' => (
        is => 'rw',
        isa => ChangeFreq,
    );

Valid values are:

Priority

    has 'priority' => (
        is => 'rw',
        isa => Priority,
    );

Subtype of Num with values in range from 0.0 to 1.0.

SitemapURL

    has 'url' => (
        is => 'rw',
        isa => SitemapURL,
    );

Role type, argument needs to implement WWW::Sitemap::XML::URL::Interface.

SitemapIndexSitemap

    has 'sitemap' => (
        is => 'rw',
        isa => SitemapIndexSitemap,
    );

Role type, argument needs to implement WWW::SitemapIndex::XML::Sitemap::Interface.

LowercaseStr

    has 'lowercase' => (
        is => 'rw',
        coerce => 1,
        isa => LowercaseStr,
    );

Subtype of Str, with only lowercase characters.

Coerces from Str using lc.

Max100CharsStr

    has 'short_str' => (
        is => 'rw',
        isa => Max100CharsStr,
    );

Subtype of Str, up to 100 characters.

Max2048CharsStr

    has 'longer_str' => (
        is => 'rw',
        isa => Max2048CharsStr,
    );

Subtype of Str, up to 2048 characters.

StrBool

    has 'yes_no' => (
        is => 'rw',
        coerce => 1,
        isa => StrBool,
    );

Subtype of LowercaseStr, with valid values yes and no.

Coerces from Bool.

ImageObject

    has 'image' => (
        is => 'rw',
        coerce => 1,
        isa => ImageObject,
    );

Role type, argument needs to implement WWW::Sitemap::XML::Google::Image::Interface.

Coerces from HashRef by creating WWW::Sitemap::XML::Google::Image object.

ArrayRefOfImageObjects

    has 'images' => (
        is => 'rw',
        coerce => 1,
        isa => ArrayRefOfImageObjects,
    );

Subtype of ArrayRef, were values are "ImageObject" elements.

Coerces from ArrayRef[HashRef] by creating an array of WWW::Sitemap::XML::Google::Image objects.

VideoObject

    has 'video' => (
        is => 'rw',
        coerce => 1,
        isa => VideoObject,
    );

Role type, argument needs to implement WWW::Sitemap::XML::Google::Video::Interface.

Coerces from HashRef by creating WWW::Sitemap::XML::Google::Video object.

ArrayRefOfVideoObjects

    has 'videos' => (
        is => 'rw',
        coerce => 1,
        isa => ArrayRefOfVideoObjects,
    );

Subtype of ArrayRef, were values are "VideoObject" elements.

Coerces from ArrayRef[HashRef] by creating an array of WWW::Sitemap::XML::Google::Video objects.

VideoPlayer

    has 'video_player' => (
        is => 'rw',
        coerce => 1,
        isa => VideoPlayer,
    );

Role type, argument needs to implement WWW::Sitemap::XML::Google::Video::Player::Interface.

Coerces from HashRef by creating WWW::Sitemap::XML::Google::Video::Player object.

Coerces from Str by creating WWW::Sitemap::XML::Google::Video::Player object, where the string is used as "loc" in WWW::Sitemap::XML::Google::Video::Player.

AUTHOR ^

Alex J. G. Burzyński <ajgb@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2014 by Alex J. G. Burzyński <ajgb@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: