WWW::Sitemap::XML::Types - Type constraints used by WWW::Sitemap::XML and WWW::Sitemap::XML::URL
version 2.02
Type constraints used by WWW::Sitemap::XML and WWW::Sitemap::XML::URL.
has 'loc' => ( is => 'rw', isa => Location, );
URL location, coerced from Uri via { $_->as_string }.
{ $_->as_string }
has 'changefreq' => ( is => 'rw', isa => ChangeFreq, );
Valid values are:
always
hourly
daily
weekly
monthly
yearly
never
has 'priority' => ( is => 'rw', isa => Priority, );
Subtype of Num with values in range from 0.0 to 1.0.
Num
0.0
1.0
has 'url' => ( is => 'rw', isa => SitemapURL, );
Role type, argument needs to implement WWW::Sitemap::XML::URL::Interface.
has 'sitemap' => ( is => 'rw', isa => SitemapIndexSitemap, );
Role type, argument needs to implement WWW::SitemapIndex::XML::Sitemap::Interface.
has 'lowercase' => ( is => 'rw', coerce => 1, isa => LowercaseStr, );
Subtype of Str, with only lowercase characters.
Str
Coerces from Str using lc.
lc
has 'short_str' => ( is => 'rw', isa => Max100CharsStr, );
Subtype of Str, up to 100 characters.
has 'longer_str' => ( is => 'rw', isa => Max2048CharsStr, );
Subtype of Str, up to 2048 characters.
has 'yes_no' => ( is => 'rw', coerce => 1, isa => StrBool, );
Subtype of LowercaseStr, with valid values yes and no.
LowercaseStr
Coerces from Bool.
Bool
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.
HashRef
has 'images' => ( is => 'rw', coerce => 1, isa => ArrayRefOfImageObjects, );
Subtype of ArrayRef, were values are "ImageObject" elements.
ArrayRef
Coerces from ArrayRef[HashRef] by creating an array of WWW::Sitemap::XML::Google::Image objects.
ArrayRef[HashRef]
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.
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.
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.
Alex J. G. Burzyński <ajgb@cpan.org>
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.
To install WWW::Sitemap::XML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Sitemap::XML
CPAN shell
perl -MCPAN -e shell install WWW::Sitemap::XML
For more information on module installation, please visit the detailed CPAN module installation guide.