r19887 - in /trunk/libxml-atom-service-perl: Changes META.yml debian/changelog debian/control lib/XML/Atom/Atompub.pm lib/XML/Atom/Categories.pm lib/XML/Atom/Collection.pm lib/XML/Atom/Service.pm lib/XML/Atom/Workspace.pm
ghostbar-guest at users.alioth.debian.org
ghostbar-guest at users.alioth.debian.org
Mon May 12 03:03:30 UTC 2008
Author: ghostbar-guest
Date: Mon May 12 03:03:27 2008
New Revision: 19887
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=19887
Log:
* New upstream release
* cleanup of debian/control
Modified:
trunk/libxml-atom-service-perl/Changes
trunk/libxml-atom-service-perl/META.yml
trunk/libxml-atom-service-perl/debian/changelog
trunk/libxml-atom-service-perl/debian/control
trunk/libxml-atom-service-perl/lib/XML/Atom/Atompub.pm
trunk/libxml-atom-service-perl/lib/XML/Atom/Categories.pm
trunk/libxml-atom-service-perl/lib/XML/Atom/Collection.pm
trunk/libxml-atom-service-perl/lib/XML/Atom/Service.pm
trunk/libxml-atom-service-perl/lib/XML/Atom/Workspace.pm
Modified: trunk/libxml-atom-service-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/Changes?rev=19887&op=diff
==============================================================================
--- trunk/libxml-atom-service-perl/Changes (original)
+++ trunk/libxml-atom-service-perl/Changes Mon May 12 03:03:27 2008
@@ -1,3 +1,9 @@
+2008-03-25 Takeru INOUE <takeru.inoue _ gmail.com>
+
+ * release 0.16.0:
+ * lib, t
+ - change coding conventions
+
2007-09-18 Takeru INOUE <takeru.inoue _ gmail.com>
* release 0.15.4:
Modified: trunk/libxml-atom-service-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/META.yml?rev=19887&op=diff
==============================================================================
--- trunk/libxml-atom-service-perl/META.yml (original)
+++ trunk/libxml-atom-service-perl/META.yml Mon May 12 03:03:27 2008
@@ -1,6 +1,6 @@
---
name: XML-Atom-Service
-version: 0.15.4
+version: 0.16.0
author:
- 'Takeru INOUE <takeru.inoue _ gmail.com>'
abstract: Atom Service Document object
@@ -23,7 +23,7 @@
file: lib/XML/Atom/Atompub.pm
XML::Atom::Service:
file: lib/XML/Atom/Service.pm
- version: 0.15.4
+ version: 0.16.0
XML::Atom::Workspace:
file: lib/XML/Atom/Workspace.pm
generated_by: Module::Build version 0.2808
Modified: trunk/libxml-atom-service-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/debian/changelog?rev=19887&op=diff
==============================================================================
--- trunk/libxml-atom-service-perl/debian/changelog (original)
+++ trunk/libxml-atom-service-perl/debian/changelog Mon May 12 03:03:27 2008
@@ -1,5 +1,14 @@
+libxml-atom-service-perl (0.16.0-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * debian/control:
+ + There's no such 3.7.3.0 Standard-Version, fixed to 3.7.3
+ * Initial upload to debian archive (Closes: #458809)
+
+ -- Jose Luis Rivas <ghostbar38 at gmail.com> Sun, 11 May 2008 22:03:12 -0430
+
libxml-atom-service-perl (0.15.4-1) unstable; urgency=low
- * Initial Release (Closes: #458809)
+ * Initial Release
-- David Paleino <d.paleino at gmail.com> Sat, 19 Apr 2008 09:19:47 +0200
Modified: trunk/libxml-atom-service-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/debian/control?rev=19887&op=diff
==============================================================================
--- trunk/libxml-atom-service-perl/debian/control (original)
+++ trunk/libxml-atom-service-perl/debian/control Mon May 12 03:03:27 2008
@@ -5,7 +5,7 @@
Build-Depends-Indep: perl (>= 5.8.8-12)
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: David Paleino <d.paleino at gmail.com>
-Standards-Version: 3.7.3.0
+Standards-Version: 3.7.3
Homepage: http://search.cpan.org/dist/XML-Atom-Service/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libxml-atom-service-perl/
Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/
Modified: trunk/libxml-atom-service-perl/lib/XML/Atom/Atompub.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/lib/XML/Atom/Atompub.pm?rev=19887&op=diff
==============================================================================
--- trunk/libxml-atom-service-perl/lib/XML/Atom/Atompub.pm (original)
+++ trunk/libxml-atom-service-perl/lib/XML/Atom/Atompub.pm Mon May 12 03:03:27 2008
@@ -7,84 +7,84 @@
use XML::Atom::Service;
use XML::Atom::Thing;
-if ( ! XML::Atom::Entry->can('edited') ) {
+unless (XML::Atom::Entry->can('edited')) {
*XML::Atom::Entry::edited = sub {
- my $self = shift;
- my $ns_uri = $XML::Atom::Service::DefaultNamespace;
- my $app = XML::Atom::Namespace->new( app => $ns_uri );
- if (@_) {
- $self->set( $app, 'edited', $_[0] );
- }
- else {
- $self->get( $app, 'edited' );
- }
+ my($self, $edited) = @_;
+ my $ns_uri = $XML::Atom::Service::DefaultNamespace;
+ my $app = XML::Atom::Namespace->new(app => $ns_uri);
+ if ($edited) {
+ $self->set($app, 'edited', $edited);
+ }
+ else {
+ $self->get($app, 'edited');
+ }
};
}
-if ( ! XML::Atom::Entry->can('control') ) {
- XML::Atom::Entry->mk_object_list_accessor( 'control' => 'XML::Atom::Control' );
+unless (XML::Atom::Entry->can('control')) {
+ XML::Atom::Entry->mk_object_list_accessor('control' => 'XML::Atom::Control');
package XML::Atom::Control;
- use base qw( XML::Atom::Base );
-
- __PACKAGE__->mk_elem_accessors(qw( draft ));
+ use base qw(XML::Atom::Base);
+
+ __PACKAGE__->mk_elem_accessors(qw(draft));
sub element_name { 'control' }
sub element_ns { $XML::Atom::Service::DefaultNamespace }
}
-if ( ! XML::Atom::Content->can('src') ) {
- XML::Atom::Content->mk_attr_accessors( qw( src ) );
-}
-
-if ( ! XML::Atom::Thing->can('alternate_link') ) {
+unless (XML::Atom::Content->can('src')) {
+ XML::Atom::Content->mk_attr_accessors(qw(src));
+}
+
+unless (XML::Atom::Thing->can('alternate_link')) {
*XML::Atom::Thing::alternate_link = sub {
- my $atom = shift;
- my @hrefs;
- if (@_) {
- my @links1 = grep { $_->rel && $_->rel ne 'alternate'} $atom->links;
- my @links2 = map { my $link = XML::Atom::Link->new;
- $link->rel('alternate');
- $link->href($_);
- $link }
- @_;
- $atom->link( @links1, @links2 );
- @hrefs = @_;
- }
- else {
- @hrefs = map { $_->href } grep { ! $_->rel || $_->rel eq 'alternate' } $atom->links;
- }
- return wantarray ? @hrefs : $hrefs[0];
+ my($atom, @args) = @_;
+ my @hrefs;
+ if (@args) {
+ my @links1 = grep { $_->rel && $_->rel ne 'alternate'} $atom->links;
+ my @links2 = map { my $link = XML::Atom::Link->new;
+ $link->rel('alternate');
+ $link->href($_);
+ $link }
+ @args;
+ $atom->link( @links1, @links2 );
+ @hrefs = @_;
+ }
+ else {
+ @hrefs = map { $_->href } grep { ! $_->rel || $_->rel eq 'alternate' } $atom->links;
+ }
+ wantarray ? @hrefs : $hrefs[0];
};
}
-for my $rel qw( self edit edit-media related enclosure via first previous next last ) {
+for my $rel qw(self edit edit-media related enclosure via first previous next last) {
no strict 'refs'; ## no critic
my $method = join '_', $rel, 'link';
$method =~ s/-/_/g;
- next if XML::Atom::Thing->can( $method );
+ next if XML::Atom::Thing->can($method);
*{"XML::Atom::Thing::$method"} = sub {
- my $atom = shift;
- my @hrefs;
- if (@_) {
- my @links1 = grep { ! $_->rel || $_->rel ne $rel } $atom->links;
- my @links2 = map { my $link = XML::Atom::Link->new;
- $link->rel( $rel );
- $link->href($_);
- $link }
- @_;
- $atom->link( @links1, @links2 );
- @hrefs = @_;
- }
- else {
- @hrefs = map { $_->href } grep { $_->rel && $_->rel eq $rel } $atom->links;
- }
- return wantarray ? @hrefs : $hrefs[0];
+ my($atom, @args) = @_;
+ my @hrefs;
+ if (@args) {
+ my @links1 = grep { ! $_->rel || $_->rel ne $rel } $atom->links;
+ my @links2 = map { my $link = XML::Atom::Link->new;
+ $link->rel( $rel );
+ $link->href($_);
+ $link }
+ @args;
+ $atom->link( @links1, @links2 );
+ @hrefs = @_;
+ }
+ else {
+ @hrefs = map { $_->href } grep { $_->rel && $_->rel eq $rel } $atom->links;
+ }
+ wantarray ? @hrefs : $hrefs[0];
};
}
Modified: trunk/libxml-atom-service-perl/lib/XML/Atom/Categories.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/lib/XML/Atom/Categories.pm?rev=19887&op=diff
==============================================================================
--- trunk/libxml-atom-service-perl/lib/XML/Atom/Categories.pm (original)
+++ trunk/libxml-atom-service-perl/lib/XML/Atom/Categories.pm Mon May 12 03:03:27 2008
@@ -6,43 +6,16 @@
use XML::Atom;
use XML::Atom::Category;
-use XML::Atom::Client;
use XML::Atom::Service;
-use base qw( XML::Atom::Thing );
+use base qw(XML::Atom::Thing);
-__PACKAGE__->mk_attr_accessors(qw( fixed scheme href ));
+__PACKAGE__->mk_attr_accessors(qw(fixed scheme href));
sub element_name { 'categories' }
sub element_ns { $XML::Atom::Service::DefaultNamespace }
sub XML::Atom::Category::element_ns { $XML::Atom::Util::NS_MAP{$XML::Atom::DefaultVersion} }
-
-if ( ! XML::Atom::Client->can('getCategories') ) {
- *XML::Atom::Client::getCategories = sub {
- warn 'XML::Atom::Client->getCategories is DEPRECATED and '
- . 'moved to Atompub::Client->getCategories';
- my $client = shift;
- my($uri) = @_;
- return $client->error("Must pass a CategoriesURI before retrieving category document")
- unless $uri;
- my $req = HTTP::Request->new(GET => $uri);
- my $res = $client->make_request($req);
- return $client->error("Error on GET $uri: " . $res->status_line)
- unless $res->code == 200;
- my $categories = XML::Atom::Categories->new(Stream => \$res->content)
- or return $client->error(XML::Atom::Categories->errstr);
- $categories;
- };
-}
-
-if ( ! XML::Atom::Client->can('getCategory') ) {
- *XML::Atom::Client::getCategory = sub {
- warn 'XML::Atom::Client->getCategory is DEPRECATED and '
- . 'moved to Atompub::Client->getCategories';
- XML::Atom::Client::getCategories(@_);
- };
-}
1;
__END__
Modified: trunk/libxml-atom-service-perl/lib/XML/Atom/Collection.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/lib/XML/Atom/Collection.pm?rev=19887&op=diff
==============================================================================
--- trunk/libxml-atom-service-perl/lib/XML/Atom/Collection.pm (original)
+++ trunk/libxml-atom-service-perl/lib/XML/Atom/Collection.pm Mon May 12 03:03:27 2008
@@ -6,88 +6,84 @@
use XML::Atom;
use XML::Atom::Service;
-use base qw( XML::Atom::Base );
+use base qw(XML::Atom::Base);
-__PACKAGE__->mk_attr_accessors(qw( href ));
+__PACKAGE__->mk_attr_accessors(qw(href));
sub element_name { 'collection' }
sub element_ns { $XML::Atom::Service::DefaultNamespace }
sub title {
- my $self = shift;
+ my($self, $title) = @_;
my $ns_uri = $XML::Atom::Util::NS_MAP{$XML::Atom::DefaultVersion};
- my $atom = XML::Atom::Namespace->new( atom => $ns_uri );
- if (@_) {
- $self->set( $atom, 'title', $_[0] );
+ my $atom = XML::Atom::Namespace->new(atom => $ns_uri);
+ if (defined $title) {
+ $self->set($atom, 'title', $title);
}
else {
- $self->get( $atom, 'title' );
+ $self->get($atom, 'title');
}
}
-__PACKAGE__->mk_object_list_accessor(
- 'categories' => 'XML::Atom::Categories',
-);
+__PACKAGE__->mk_object_list_accessor('categories' => 'XML::Atom::Categories');
# accessors to text elements, multiple which there can be
-if ( ! XML::Atom::Base->can('mk_elem_list_accessor') ) {
- use XML::Atom::Util qw( childlist create_element );
+unless (XML::Atom::Base->can('mk_elem_list_accessor')) {
+ use XML::Atom::Util qw(childlist create_element);
*XML::Atom::Base::mk_elem_list_accessor = sub {
- my $class = shift;
- my($name, $moniker) = @_;
+ my($class, $name, $moniker) = @_;
- no strict 'refs'; ## no critic
+ no strict 'refs'; ## no critic
- *{"$class\::$name"} = sub {
- my $obj = shift;
+ *{"$class\::$name"} = sub {
+ my($obj, @args) = @_;
+ my $ns_uri = $class->element_ns || $obj->ns;
+ if (@args) {
+ # setter: clear existent elements first
+ my @elem = childlist($obj->elem, $ns_uri, $name);
+ for my $el (@elem) {
+ $obj->elem->removeChild($el);
+ }
- my $ns_uri = $class->element_ns || $obj->ns;
- if (@_) {
- # setter: clear existent elements first
- my @elem = childlist($obj->elem, $ns_uri, $name);
- for my $el (@elem) {
- $obj->elem->removeChild($el);
- }
+ # add the new elements for each
+ my $adder = "add_$name";
+ for my $add_elem (@args) {
+ $obj->$adder($add_elem);
+ }
+ }
+ else {
+ # getter:
+ my @children = map { $_->textContent } childlist( $obj->elem, $ns_uri, $name );
+ wantarray ? @children : $children[0];
+ }
+ };
- # add the new elements for each
- my $adder = "add_$name";
- for my $add_elem (@_) {
- $obj->$adder($add_elem);
- }
- } else {
- # getter:
- my @children = map { $_->textContent } childlist( $obj->elem, $ns_uri, $name );
- wantarray ? @children : $children[0];
- }
- };
+ if ($moniker) {
+ *{"$class\::$moniker"} = sub {
+ my($obj, @args) = @_;
+ if (@args) {
+ return $obj->$name(@args);
+ }
+ else {
+ my @obj = $obj->$name;
+ return wantarray ? @obj : \@obj;
+ }
+ };
+ }
- if ($moniker) {
- *{"$class\::$moniker"} = sub {
- my $obj = shift;
- if (@_) {
- return $obj->$name(@_);
- } else {
- my @obj = $obj->$name;
- return wantarray ? @obj : \@obj;
- }
- };
- }
-
- *{"$class\::add_$name"} = sub {
- my $obj = shift;
- my($stuff) = @_;
-
- my $ns_uri = $class->element_ns || $obj->ns;
- my $elem = create_element( $ns_uri, 'accept' );
- $elem->appendText($stuff);
- $obj->elem->appendChild($elem);
- };
+ *{"$class\::add_$name"} = sub {
+ my($obj, $stuff) = @_;
+ my $ns_uri = $class->element_ns || $obj->ns;
+ my $elem = create_element($ns_uri, 'accept');
+ $elem->appendText($stuff);
+ $obj->elem->appendChild($elem);
+ };
};
}
-__PACKAGE__->mk_elem_list_accessor( 'accept', 'accepts' );
+__PACKAGE__->mk_elem_list_accessor('accept', 'accepts');
1;
__END__
Modified: trunk/libxml-atom-service-perl/lib/XML/Atom/Service.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/lib/XML/Atom/Service.pm?rev=19887&op=diff
==============================================================================
--- trunk/libxml-atom-service-perl/lib/XML/Atom/Service.pm (original)
+++ trunk/libxml-atom-service-perl/lib/XML/Atom/Service.pm Mon May 12 03:03:27 2008
@@ -5,14 +5,13 @@
use Carp;
use XML::Atom 0.27;
-use XML::Atom::Client;
use XML::Atom::Workspace;
use XML::Atom::Collection;
use XML::Atom::Categories;
use XML::Atom::Atompub;
-use base qw( XML::Atom::Thing );
-
-use version; our $VERSION = qv('0.15.4');
+use base qw(XML::Atom::Thing);
+
+use version; our $VERSION = qv('0.16.0');
#our $DefaultNamespace = 'http://purl.org/atom/app#';
our $DefaultNamespace = 'http://www.w3.org/2007/app';
@@ -23,28 +22,7 @@
sub element_ns { $DefaultNamespace }
-__PACKAGE__->mk_object_list_accessor(
- 'workspace' => 'XML::Atom::Workspace',
- 'workspaces',
-);
-
-if ( ! XML::Atom::Client->can('getService') ) {
- *XML::Atom::Client::getService = sub {
- warn 'XML::Atom::Client->getService is DEPRECATED and '
- . 'moved to Atompub::Client->getService';
- my $client = shift;
- my($uri) = @_;
- return $client->error("Must pass a ServiceURI before retrieving service document")
- unless $uri;
- my $req = HTTP::Request->new(GET => $uri);
- my $res = $client->make_request($req);
- return $client->error("Error on GET $uri: " . $res->status_line)
- unless $res->code == 200;
- my $service = XML::Atom::Service->new(Stream => \$res->content)
- or return $client->error(XML::Atom::Service->errstr);
- $service;
- };
-}
+__PACKAGE__->mk_object_list_accessor('workspace' => 'XML::Atom::Workspace', 'workspaces');
1;
__END__
Modified: trunk/libxml-atom-service-perl/lib/XML/Atom/Workspace.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-atom-service-perl/lib/XML/Atom/Workspace.pm?rev=19887&op=diff
==============================================================================
--- trunk/libxml-atom-service-perl/lib/XML/Atom/Workspace.pm (original)
+++ trunk/libxml-atom-service-perl/lib/XML/Atom/Workspace.pm Mon May 12 03:03:27 2008
@@ -6,28 +6,25 @@
use XML::Atom;
use XML::Atom::Service;
-use base qw( XML::Atom::Base );
+use base qw(XML::Atom::Base);
sub element_name { 'workspace' }
sub element_ns { $XML::Atom::Service::DefaultNamespace }
sub title {
- my $self = shift;
+ my($self, $title) = @_;
my $ns_uri = $XML::Atom::Util::NS_MAP{$XML::Atom::DefaultVersion};
- my $atom = XML::Atom::Namespace->new( atom => $ns_uri );
- if (@_) {
- $self->set( $atom, 'title', $_[0] );
+ my $atom = XML::Atom::Namespace->new(atom => $ns_uri);
+ if (defined $title) {
+ $self->set( $atom, 'title', $title );
}
else {
$self->get( $atom, 'title' );
}
}
-__PACKAGE__->mk_object_list_accessor(
- 'collection' => 'XML::Atom::Collection',
- 'collections',
-);
+__PACKAGE__->mk_object_list_accessor('collection' => 'XML::Atom::Collection', 'collections');
1;
__END__
More information about the Pkg-perl-cvs-commits
mailing list