Many thanks for your help, Roderich!  Setting the PAR_VERBATIM
environment variable did the trick. 

It took a keen eye to catch that "=cut" line.

I haven't tried your patch yet, but I'll give it a shot, too.

Thanks again,
Clay.


> -----Original Message-----
> From: Roderich Schupp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 26, 2004 3:35 AM
> To: Clay Harmony
> Cc: PAR Mailing List; [EMAIL PROTECTED]
> Subject: RE: Modules don't get included
> 
> On Wed, 2004-02-25 at 18:58, [EMAIL PROTECTED] wrote:
> > Some further information...
> >
> > The error I get is:
> > Can't locate object method "postorder" via package "Graph::DFS" at
> > Graph/Base.pm line 1629.
> ...
> > Am I doing something wrong?
> 
> No, it's actually a buglet in the POD of Graph/Traversal.pm,
> there's a spurious =cut on line 245. Now pp by default strips all
> PODs from modules that it packs (and replaces them with #line
> directives). If we extract lib/Graph/Traversal.pm from our pp-packed
> executable and compare it to the original, we see
> 
> --- lib/Graph/Traversal.pm      Thu Aug 19 10:06:42 1999
> +++ lib/Graph/Traversal.pm-pp   Thu Feb 26 08:54:00 2004
> @@ -243,44 +200,21 @@
>  }
> 
>  =cut
> -=item next_postorder
> -
> -       $v = $S->next_postorder
> -
> -Returns the next vertex in postorder of the graph
> -encapsulated within the search object $S.
> -
> -=cut
> +#line 254
>  sub next_postorder {
>      my $S = shift;
> 
> Note that the first =cut survived, tricking Perl into effectively
> ignoring the rest of the module.
> 
> As a workaround, set PAR_VERBATIM=1 in your environment while pp'ing.
> This will prevent pp from stripping PODs.
> 
> Autrijus,
> though this is not PAR's fault, here's a patch for PodStrip.pm
> to strip such spurious =cut's:
> 
> --- PAR-0.79/lib/PAR/Filter/PodStrip.pm 2004-01-06 22:18:47.000000000
> +0100
> +++ ./PodStrip.pm       2004-02-26 09:48:43.856000000 +0100
> @@ -31,14 +31,14 @@
>      $data = $1 if $$ref =~ s/((?:^__DATA__$).*)//ms;
> 
>      my $line = 1;
> -    if ($$ref =~ /^=(?:head\d|pod|begin|item|over|for|back|end)\b/) {
> +    if ($$ref =~
/^=(?:head\d|pod|begin|item|over|for|back|end|cut)\b/)
> {
>          $$ref = "\n$$ref";
>          $line--;
>      }
>      $$ref =~ s{(
>         (.*?\n)
> -       =(?:head\d|pod|begin|item|over|for|back|end)\b
> -       .*?\n
> +       (?:=(?:head\d|pod|begin|item|over|for|back|end)\b
> +       .*?\n)?
>         (?:=cut[\t ]*[\r\n]*?|\Z)
>         (\r?\n)?
>      )}{
> 
> Cheers, Roderich
> 

Reply via email to