Chris Bennett wrote:
This looks harder than p5-SVG patch

# perldoc Autoformat.pm
Got a 0-length file from Autoformat.pm via Pod::Perldoc::ToMan!?

also checked /usr/ports/pobj/p5-Text-Autoformat-1.12p0/Text-Autoformat-1.12/blib/lib/Text/Autoformat.pm and /usr/ports/pobj/p5-Text-Autoformat-1.12p0/Text-Autoformat-1.12/lib/Text/Autoformat.pm

There is a lengthy POD inside that should be working.

I just tried removing all the perl in the module ( up from __END__) and perldoc works fine

I have found the problem but I'm not sure what step to take since this existing error nullifies the perl code contained within. The pod notations of =begin up to =cut comments out what looks like debugging code? If I comment out these two, the problem is solved for perldoc, but I'm not sure that this code should be re-activated this way.
Perhaps this whole STDERR should be commented out?



I found this:

# blockquote($text,$para, $format, $tlen, \...@hang, \%args);
sub blockquote {
   my ($dummy, $para, $format, $tlen, $hang, $args) = @_;
=begin other
   print STDERR "[", join("|", $para->{raw} =~
/ \A(\s*)        # $1 - leading whitespace (quotation)
      (["']|``)        # $2 - opening quotemark
      (.*)            # $3 - quotation
      (''|\2)        # $4 closing quotemark
      \s*?\n        # trailing whitespace
      (\1[ ]+)        # $5 - leading whitespace (attribution)
      (--|-)        # $6 - attribution introducer
      ([^\n]*?$)        # $7 - attribution line 1
      ((\5[^\n]*?$)*)        # $8 - attributions lines 2-N
      \s*\Z
    /xsm
), "]\n";
=cut
   $para->{text} =~
       / \A(\s*)        # $1 - leading whitespace (quotation)
      (["']|``)        # $2 - opening quotemark
      (.*)            # $3 - quotation
      (''|\2)        # $4 closing quotemark
      \s*?\n        # trailing whitespace
      (\1[ ]+)        # $5 - leading whitespace (attribution)
      (--|-)        # $6 - attribution introducer
      (.*?$)        # $7 - attribution line 1
      ((\5.*?$)*)        # $8 - attributions lines 2-N
      \s*\Z
    /xsm
    or return;

   #print "[$1][$2][$3][$4][$5][$6][$7]\n";
   my $indent = length $1;
   my $text = $2.$3.$4;
   my $qindent = length $2;
   my $aindent = length $5;
   my $attribintro = $6;
   my $attrib = $7.$8;
   $text =~ s/\n/ /g;

   $_[0] .=

               form {squeeze=>$args->{squeeze}, trim=>1,
         fill => $args->{expfill}
                  },
      $format . q{ }x$indent . q{<}x$tlen,
            @$hang, $text,
      $format . q{ }x($qindent) . q{[}x($tlen-$qindent),
            @$hang, $text,
      {squeeze=>0},
      $format . q{ } x $aindent . q{>> } . q{[}x($tlen-$aindent-3),
            @$hang, $attribintro, $attrib;
   return 1;
}

--
A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects.
  -- Robert Heinlein

Reply via email to