line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Search::Sitemap::Index; |
2
|
|
|
|
|
|
|
$Search::Sitemap::Index::VERSION = '2.13_01'; |
3
|
1
|
|
|
1
|
|
63421
|
use 5.008003; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
5
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
6
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:JASONK'; |
7
|
1
|
|
|
1
|
|
238
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
extends 'Search::Sitemap'; |
9
|
|
|
|
|
|
|
use MooseX::ClassAttribute; |
10
|
|
|
|
|
|
|
use MooseX::Types::Moose qw( ArrayRef ); |
11
|
|
|
|
|
|
|
use Search::Sitemap::Types qw( SitemapURL XMLPrettyPrintValue ); |
12
|
|
|
|
|
|
|
use namespace::clean -except => 'meta'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
class_has '+base_element' => ( default => 'sitemapindex' ); |
15
|
|
|
|
|
|
|
class_has '+url_type' => ( default => 'sitemap' ); |
16
|
|
|
|
|
|
|
class_has '+url_fields' => ( default => sub { [qw( loc lastmod )] } ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
around '_build_xml_headers' => sub { |
19
|
|
|
|
|
|
|
my $next = shift; |
20
|
|
|
|
|
|
|
my $headers = $next->( @_ ); |
21
|
|
|
|
|
|
|
$headers->{ 'xsi:schemaLocation' } =~ s/sitemap\.xsd$/siteindex.xsd/; |
22
|
|
|
|
|
|
|
return $headers; |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
__END__ |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Search::Sitemap::Index - Perl extension for managing Sitemap Indexes |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use Search::Sitemap::Index; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $index = Search::Sitemap::Index->new(); |
38
|
|
|
|
|
|
|
$index->read( 'sitemap-index.gz' ); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
$index->add( Search::Sitemap::URL->new( |
41
|
|
|
|
|
|
|
loc => 'http://www.jasonkohles.com/sitemap1.gz', |
42
|
|
|
|
|
|
|
lastmod => '2005-11-01', |
43
|
|
|
|
|
|
|
) ); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
$index->write( 'sitemap-index.gz' ); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
A sitemap index is used to point search engines at your sitemaps if you have |
50
|
|
|
|
|
|
|
more than one of them. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 METHODS |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
L<Search::Sitemap::Index> inherits all the methods found in L<Search::Sitemap>. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SEE ALSO |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
L<Search::Sitemap> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L<Search::Sitemap::Ping> |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
L<http://www.sitemaps.org/> |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 AUTHOR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Jason Kohles, E<lt>email@jasonkohles.comE<gt> |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Copyright (C) 2005-2009 by Jason Kohles |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
74
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
77
|
|
|
|
|
|
|
|