>>>>> "JP" == John Porter <[EMAIL PROTECTED]> writes:

  JP> Maybe what's needed is two distinct perl pod processor types, one
  JP> which passes on the text literally to the compiler, and one which
  JP> wraps it up like a string literal.

  JP>   print

  JP>   =for perl-string pod
  JP>   Help is on the way.

  JP>   ;

and how will perl know that is a string? the special here doc format has
more appeal to me.

        print <<=POD ;
this is help for pod and code
=POD

for perl it is just a literal string which can be used any way it wants
and there are no major parsing changes.

for pod, it has to look for <<=POD tokens and the closing token (which
is in pod form on the left margin)

another possibility is nesting pod in a here doc.

        $help = <<POD ;
=pod perl
help text seen by both pod and perl
=cut
POD

        $help =~ s/^=(:pod|cut)$//mg ;

that works for me assuming perl will include the pod directives in the
here text. since it has to look for =pod anyway, we could define it to
delete those lines and then we don't need the s///. this would only be
in effect in here docs (which are multiline by definition unlike long
quoted strings).

the two goals of code in pod and pod in data are not the same and
probably won't use the same mechanisms. all i want is pod in perl
strings and that is nothing like having perl code be seen by pod as
well.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

Reply via email to