r49996 - in /branches/upstream/libpod-abstract-perl/current: ./ bin/ lib/Pod/ lib/Pod/Abstract/ lib/Pod/Abstract/Filter/ t/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sun Jan 3 03:09:58 UTC 2010
Author: jawnsy-guest
Date: Sun Jan 3 03:09:42 2010
New Revision: 49996
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=49996
Log:
[svn-upgrade] Integrating new upstream version, libpod-abstract-perl (0.20)
Modified:
branches/upstream/libpod-abstract-perl/current/Changes
branches/upstream/libpod-abstract-perl/current/META.yml
branches/upstream/libpod-abstract-perl/current/bin/paf
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/BuildNode.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/add_podcmds.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/clear_podcmds.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/cut.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/find.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/number_sections.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/overlay.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/sort.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/summary.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/uncut.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/unoverlay.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Node.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Parser.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Path.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Serial.pm
branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Tree.pm
branches/upstream/libpod-abstract-perl/current/t/03_buildnode.t
Modified: branches/upstream/libpod-abstract-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/Changes?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/Changes (original)
+++ branches/upstream/libpod-abstract-perl/current/Changes Sun Jan 3 03:09:42 2010
@@ -1,4 +1,11 @@
Revision history for Pod-Abstract
+
+0.20 03/01/2010
+ Removed usage of UNIVERSAL isa and can as functions, will correct
+ a deprecation warning with Perl 5.11. Fixed a bug with
+ nodes->from_pod which did not work as documented. Corrected some
+ minor errors with documentation formatting. Added test coverage
+ for from_pod.
0.19 21/06/2009
Added =head1 NAME blocks to those modules missing them. Added some
Modified: branches/upstream/libpod-abstract-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/META.yml?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/META.yml (original)
+++ branches/upstream/libpod-abstract-perl/current/META.yml Sun Jan 3 03:09:42 2010
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Pod-Abstract
-version: 0.19
+version: 0.20
version_from: lib/Pod/Abstract.pm
installdirs: site
requires:
Modified: branches/upstream/libpod-abstract-perl/current/bin/paf
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/bin/paf?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/bin/paf (original)
+++ branches/upstream/libpod-abstract-perl/current/bin/paf Sun Jan 3 03:09:42 2010
@@ -6,7 +6,6 @@
use Pod::Abstract;
use Pod::Abstract::Filter;
-use UNIVERSAL qw(isa);
use File::Temp qw(tempfile tempdir);
@@ -207,7 +206,7 @@
($out, $tmpfilename) = tempfile;
}
- if(isa($next, 'Pod::Abstract::Node')) {
+ if(eval { $next->isa( 'Pod::Abstract::Node' ) }) {
if($flags{d}) {
print $out $next->ptree;
} else {
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract.pm Sun Jan 3 03:09:42 2010
@@ -7,7 +7,7 @@
use Pod::Abstract::Parser;
use IO::String;
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
@@ -155,7 +155,7 @@
L<Pod::Abstract::Path>, the node selection expression language. This
is generally called by doing
-C<<$node->select(PATH_EXP)>>. Pod::Abstract::Path is the most complex
+C<< $node->select(PATH_EXP) >>. Pod::Abstract::Path is the most complex
and powerful component of this module, and if you're not using it you
should be. ;)
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/BuildNode.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/BuildNode.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/BuildNode.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/BuildNode.pm Sun Jan 3 03:09:42 2010
@@ -7,7 +7,7 @@
use Pod::Abstract::Node;
use base qw(Exporter);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
our @EXPORT_OK = qw(node nodes);
@@ -75,8 +75,9 @@
my $str = shift;
my $root = Pod::Abstract->load_string($str);
-
- my @r = map { $_->detach } $root->children;
+ return undef unless $root;
+
+ my @r = map { $_->detach; $_ } $root->children;
return @r;
}
@@ -161,6 +162,7 @@
);
my $parser = Pod::Abstract::Parser->new;
my $pt = $parser->parse_text($str);
+
if($pt) {
$parser->load_pt($para,$pt);
} else {
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter.pm Sun Jan 3 03:09:42 2010
@@ -3,9 +3,8 @@
use warnings;
use Pod::Abstract;
-use UNIVERSAL qw(isa);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
@@ -108,7 +107,7 @@
my $self = shift;
my $arg = shift;
- if( isa($arg, 'Pod::Abstract::Node') ) {
+ if( eval { $arg->isa( 'Pod::Abstract::Node' ) } ) {
return $self->filter($arg);
} else {
my $pa = Pod::Abstract->load_string($arg);
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/add_podcmds.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/add_podcmds.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/add_podcmds.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/add_podcmds.pm Sun Jan 3 03:09:42 2010
@@ -4,7 +4,7 @@
use base qw(Pod::Abstract::Filter);
use Pod::Abstract::BuildNode qw(node);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/clear_podcmds.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/clear_podcmds.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/clear_podcmds.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/clear_podcmds.pm Sun Jan 3 03:09:42 2010
@@ -3,7 +3,7 @@
use base qw(Pod::Abstract::Filter);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/cut.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/cut.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/cut.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/cut.pm Sun Jan 3 03:09:42 2010
@@ -4,7 +4,7 @@
use base qw(Pod::Abstract::Filter);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/find.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/find.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/find.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/find.pm Sun Jan 3 03:09:42 2010
@@ -5,7 +5,7 @@
use base qw(Pod::Abstract::Filter);
use Pod::Abstract::BuildNode qw(node);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
@@ -27,7 +27,7 @@
In order to be useful as an end user tool, head1 nodes (...) are added
between the found nodes. This stops perldoc from dying with no
documentation. These can be easily stripped using:
-C<<$pa->select('/head1')>>, then hoist and detach, or reparent to other
+C<< $pa->select('/head1') >>, then hoist and detach, or reparent to other
Node types.
A good example of this working as intended is:
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/number_sections.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/number_sections.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/number_sections.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/number_sections.pm Sun Jan 3 03:09:42 2010
@@ -5,7 +5,7 @@
use base qw( Pod::Abstract::Filter );
use Pod::Abstract::BuildNode qw(node);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/overlay.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/overlay.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/overlay.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/overlay.pm Sun Jan 3 03:09:42 2010
@@ -6,7 +6,7 @@
use Pod::Abstract;
use Pod::Abstract::BuildNode qw(node);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/sort.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/sort.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/sort.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/sort.pm Sun Jan 3 03:09:42 2010
@@ -13,7 +13,7 @@
=cut
-our $VERSION = '0.19';
+our $VERSION = '0.20';
sub filter {
my $self = shift;
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/summary.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/summary.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/summary.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/summary.pm Sun Jan 3 03:09:42 2010
@@ -4,7 +4,7 @@
use base qw(Pod::Abstract::Filter);
use Pod::Abstract::BuildNode qw(node);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/uncut.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/uncut.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/uncut.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/uncut.pm Sun Jan 3 03:09:42 2010
@@ -5,7 +5,7 @@
use base qw(Pod::Abstract::Filter);
use Pod::Abstract::BuildNode qw(node);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/unoverlay.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/unoverlay.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/unoverlay.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Filter/unoverlay.pm Sun Jan 3 03:09:42 2010
@@ -4,7 +4,7 @@
use base qw(Pod::Abstract::Filter);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Node.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Node.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Node.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Node.pm Sun Jan 3 03:09:42 2010
@@ -7,7 +7,7 @@
use Scalar::Util qw(weaken);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
@@ -229,7 +229,7 @@
if($body_attr) {
$body = $self->param($body_attr)->pod;
}
- if(defined $body) {
+ if(defined $body && $body ne '') {
$r .= "=$type $body$p_break";
} else {
$r .= "=$type$p_break";
@@ -368,7 +368,7 @@
my %new_params = ( );
foreach my $param (keys %$params) {
my $pv = $params->{$param};
- if(ref $pv && UNIVERSAL::can($pv, 'duplicate')) {
+ if(ref $pv && eval { $pv->can('duplicate') } ) {
$new_params{$param} = $pv->duplicate;
} elsif(! ref $pv) {
$new_params{$param} = $pv;
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Parser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Parser.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Parser.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Parser.pm Sun Jan 3 03:09:42 2010
@@ -6,7 +6,7 @@
use Data::Dumper;
use base qw(Pod::Parser);
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
@@ -136,7 +136,9 @@
if($no_parse{$top->type} && !$top->param('parse_me')) {
my $t_node = Pod::Abstract::Node->new(
type => ':text',
- body => "=$command $paragraph$p_break",
+ body => ($paragraph ne '' ?
+ "=$command $paragraph$p_break" :
+ "=$command$p_break"),
);
$top->push($t_node);
return;
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Path.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Path.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Path.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Path.pm Sun Jan 3 03:09:42 2010
@@ -4,12 +4,11 @@
use Data::Dumper;
-use UNIVERSAL qw(isa can);
use Pod::Abstract::BuildNode qw(node);
$Data::Dumper::Indent = 1;
-our $VERSION = '0.19';
+our $VERSION = '0.20';
use constant CHILDREN => 1; # /
use constant ALL => 2; # //
@@ -469,7 +468,7 @@
my $t_result;
# Allow for r_exp to be another expression - generate both
# node lists if required.
- if(can($r_exp, 'process')) {
+ if( eval { $r_exp->can('process') } ) {
my @r_list = $r_exp->process($n);
$t_result = $self->$test_action(\@t_list, \@r_list, $op);
} else {
@@ -489,7 +488,7 @@
my $r_exp = shift;
my $op = shift;
- if(scalar(@$r_exp) == 0 || isa($r_exp->[0],'Pod::Abstract::Node')) {
+ if(scalar(@$r_exp) == 0 || eval { $r_exp->[0]->isa('Pod::Abstract::Node') }) {
# combination test
my $match = 0;
foreach my $l (@$l_list) {
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Serial.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Serial.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Serial.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Serial.pm Sun Jan 3 03:09:42 2010
@@ -1,6 +1,6 @@
package Pod::Abstract::Serial;
use strict;
-our $VERSION = '0.19';
+our $VERSION = '0.20';
my $serial_number = 0;
@@ -18,7 +18,7 @@
using Data::Dumper etc, unless C<set> is used to bump the number above
the highest number read.
-Or just serialise your document with C<<$node->pod>> instead!
+Or just serialise your document with C<< $node->pod >> instead!
=cut
Modified: branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Tree.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Tree.pm?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Tree.pm (original)
+++ branches/upstream/libpod-abstract-perl/current/lib/Pod/Abstract/Tree.pm Sun Jan 3 03:09:42 2010
@@ -1,7 +1,7 @@
package Pod::Abstract::Tree;
use strict;
-our $VERSION = '0.19';
+our $VERSION = '0.20';
=head1 NAME
Modified: branches/upstream/libpod-abstract-perl/current/t/03_buildnode.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-abstract-perl/current/t/03_buildnode.t?rev=49996&op=diff
==============================================================================
--- branches/upstream/libpod-abstract-perl/current/t/03_buildnode.t (original)
+++ branches/upstream/libpod-abstract-perl/current/t/03_buildnode.t Sun Jan 3 03:09:42 2010
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 11;
use Pod::Abstract;
use Pod::Abstract::BuildNode qw(node nodes);
@@ -39,4 +39,11 @@
is( $root->pod, $pod, "Generated correct Pod" );
+my @nodes = nodes->from_pod($pod);
+my $root_2 = node->root;
+$root_2->nest(@nodes);
+
+my $pod_2 = $root_2->pod;
+is( $pod_2, $pod, "Round tripped same Pod with ->from_pod" );
+
1;
More information about the Pkg-perl-cvs-commits
mailing list