summaryrefslogtreecommitdiff
path: root/lib/Pod/InputObjects.pm
diff options
context:
space:
mode:
authorMarek Rouchal <marek.rouchal@infineon.com>2003-08-27 19:25:28 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-29 07:04:17 +0000
commitc23d1eb0e18a49361001d26c686323d50b0c6d21 (patch)
tree8a99ae1c763716321f085b9eec2826a95cc51461 /lib/Pod/InputObjects.pm
parent4cbfc073c684f8df92bed18af079c31ca9949ba5 (diff)
downloadperl-c23d1eb0e18a49361001d26c686323d50b0c6d21.tar.gz
RE: [PATCH] Pod::InputObjects performance de-pessimization
Message-ID: <9843A649BAD7FB4686F6FCBC840D600E08381508@mucse001.eu.infineon.com> PodParser-1.25 prerelease. p4raw-id: //depot/perl@20928
Diffstat (limited to 'lib/Pod/InputObjects.pm')
-rw-r--r--lib/Pod/InputObjects.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Pod/InputObjects.pm b/lib/Pod/InputObjects.pm
index eae8678e46..9cd347b969 100644
--- a/lib/Pod/InputObjects.pm
+++ b/lib/Pod/InputObjects.pm
@@ -11,7 +11,7 @@
package Pod::InputObjects;
use vars qw($VERSION);
-$VERSION = 1.13; ## Current version of this package
+$VERSION = 1.14; ## Current version of this package
require 5.005; ## requires this Perl version or later
#############################################################################
@@ -855,9 +855,15 @@ the current one.
sub append {
my $self = shift;
local *ptree = $self;
+ my $can_append = @ptree && !(ref $ptree[-1]);
for (@_) {
- next unless length;
- if (@ptree and !(ref $ptree[-1]) and !(ref $_)) {
+ if (ref) {
+ push @ptree, $_;
+ }
+ elsif(!length) {
+ next;
+ }
+ elsif ($can_append) {
$ptree[-1] .= $_;
}
else {