/[wait]/cvs-head/lib/WAIT/Parse/Pod.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /cvs-head/lib/WAIT/Parse/Pod.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 10 by ulpfr, Fri Apr 28 15:40:52 2000 UTC revision 86 by dpavlin, Mon May 24 13:41:28 2004 UTC
# Line 22  BEGIN { Line 22  BEGIN {
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);
# Line 141  sub output { Line 141  sub output {
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  }  }
# Line 208  sub wrap { Line 209  sub wrap {
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) {
# Line 230  sub wrap { Line 231  sub wrap {
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;

Legend:
Removed from v.10  
changed lines
  Added in v.86

  ViewVC Help
Powered by ViewVC 1.1.26