22 |
eval {require Pod::PText;}; |
eval {require Pod::PText;}; |
23 |
if ($@ ne '') { |
if ($@ ne '') { |
24 |
require Pod::Text; |
require Pod::Text; |
25 |
croak "Need Pod::Tex version > 2.0" if $Pod::Text::VERSION < 2.0; |
croak "Need Pod::Text version > 2.0" if $Pod::Text::VERSION < 2.0; |
26 |
@ISA = qw(Pod::Text Pod::Parser WAIT::Parse::Base); |
@ISA = qw(Pod::Text Pod::Parser WAIT::Parse::Base); |
27 |
} else { |
} else { |
28 |
@ISA = qw(Pod::PText Pod::Parser WAIT::Parse::Base); |
@ISA = qw(Pod::PText Pod::Parser WAIT::Parse::Base); |
141 |
while (@_) { |
while (@_) { |
142 |
my $tags = shift; |
my $tags = shift; |
143 |
my $text = shift; |
my $text = shift; |
144 |
croak "Bad tags parameter: '$tags'" unless ref($tags); |
# Bad tags parameter |
145 |
|
next unless ref($tags); |
146 |
push @{$self->{OUT}}, $tags, $text; |
push @{$self->{OUT}}, $tags, $text; |
147 |
} |
} |
148 |
} |
} |
209 |
my $length; |
my $length; |
210 |
|
|
211 |
# E/L will probably change length |
# E/L will probably change length |
212 |
$t =~ s/([EL])<(.*?)>/$self->interior_sequence($1,$2)/eg; |
$t =~ s/([EL])<(.+?)>/($self->interior_sequence($1,$2) || '')/eg; |
213 |
$t =~ s/\s+/ /g; |
$t =~ s/\s+/ /g; |
214 |
while ($t =~ s/^(\S+)\s?//o) { |
while ($t =~ s/^(\S+)\s?//o) { |
215 |
my $word = $1; |
my $word = $1; |
216 |
|
|
217 |
# inline length calculation for speed |
# inline length calculation for speed |
218 |
my $dummy = $word; |
my $dummy = $word; |
219 |
$dummy =~ s/[A-Z]<(.*?)>/$1/og; |
$dummy =~ s/[A-Z]<(.+?)>/$1/og; |
220 |
$length = length($dummy); |
$length = length($dummy); |
221 |
|
|
222 |
if ($length < $ll) { |
if ($length < $ll) { |
231 |
return $result; |
return $result; |
232 |
} |
} |
233 |
|
|
234 |
|
sub nested { |
235 |
|
# dummy filler |
236 |
|
return ''; |
237 |
|
} |
238 |
|
|
239 |
sub parse_from_string { |
sub parse_from_string { |
240 |
my $self = shift; |
my $self = shift; |