Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / XML / Atom.pm
CommitLineData
3fea05b9 1# $Id$
2
3package XML::Atom;
4use strict;
5
6use 5.008_001;
7our $VERSION = '0.35';
8
9BEGIN {
10 @XML::Atom::EXPORT = qw( LIBXML );
11 if (eval { require XML::LibXML }) {
12 *{XML::Atom::LIBXML} = sub() {1};
13 } else {
14 require XML::XPath;
15 *{XML::Atom::LIBXML} = sub() {0};
16 }
17 local $^W = 0;
18 *XML::XPath::Function::namespace_uri = sub {
19 my $self = shift;
20 my($node, @params) = @_;
21 my $ns = $node->getNamespace($node->getPrefix);
22 if (!$ns) {
23 $ns = ($node->getNamespaces)[0];
24 }
25 XML::XPath::Literal->new($ns ? $ns->getExpanded : '');
26 };
27
28 $XML::Atom::ForceUnicode = 0;
29 $XML::Atom::DefaultVersion = 0.3;
30}
31
32use base qw( XML::Atom::ErrorHandler Exporter );
33
34package XML::Atom::Namespace;
35use strict;
36
37sub new {
38 my $class = shift;
39 my($prefix, $uri) = @_;
40 bless { prefix => $prefix, uri => $uri }, $class;
41}
42
43sub DESTROY { }
44
45use vars qw( $AUTOLOAD );
46sub AUTOLOAD {
47 (my $var = $AUTOLOAD) =~ s!.+::!!;
48 no strict 'refs';
49 ($_[0], $var);
50}
51
521;
53__END__
54
55=head1 NAME
56
57XML::Atom - Atom feed and API implementation
58
59=head1 SYNOPSIS
60
61 use XML::Atom;
62
63=head1 DESCRIPTION
64
65Atom is a syndication, API, and archiving format for weblogs and other
66data. I<XML::Atom> implements the feed format as well as a client for the
67API.
68
69=head1 LICENSE
70
71I<XML::Atom> is free software; you may redistribute it and/or modify it
72under the same terms as Perl itself.
73
74=head1 AUTHOR
75
76Benjamin Trott, Tatsuhiko Miyagawa
77
78=head1 COPYRIGHT
79
80All rights reserved.
81
82=cut