here's an interesting request. i want perl code to have decent access to
some or all of the pod associated with that code.

so, why do we need a way to get at pod (or other doc strings) in the
code? one reason to have it comes from my work on stem. i want a remote
module to be able to spit out a help screen to any requester and of
course, i want that to be all or part of the pod or docs for that
module. and you shouldn't have to keep 2 copies of the help text.

there are 2 ways i know how to do it now and both suck in different
ways. the first is to read the pod from the source file for the module
you are in. it think the pod2XXX parser author has a module which does
this. of course this is very slow.

the other is fast but a very wacko perl hack. you interleave the pod
operations with a here doc!! it works but it is some of the ugliest code
you have ever seen. unfortunately i can't seem to find my code where i
used this trick. i am sure some of you have seen and and it should not
be reproduced in public. :)

some people have mentioned help strings as special parts of a sub
declaration like gnu lisp has. this could be more support for that type
of thing. but i don't want it to be too strange.

idea: use a special here doc token

my $help = <<POD ;
this will be in \$help as well
as seen by pod
POD

<ducking>

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