SPUG:POD link question

Martin, Asa asa.martin at attws.com
Wed Feb 19 17:14:37 CST 2003


I realize that there was a POD discussion at the SPUG meeting last night, but I missed it. Maybe a solution was given to a problem like mine, but if not, I figure there is a way to do this with regular expressions.

In my POD I have references to other scripts and other Modules that I've written. When I run my scripts  through pod2hmtl, I would like the links to be converted to html links so that when viewed the user can navigate between script references. 

I keep all my POD html files in one directory. The naming convention is very consistent. If my Module is named Module::Name, the html file is named Module_Name.html. I have three level deep modules, i.e., Module::SubDir::Name is named Module_SubDir_Name.html.

I would like to replace all references to B<Module::Name> in my POD with <A HREF="Module_Name.html">Module::Name</A>. References to scripts could occur multiple times per line.

I tried doing this with a regular expression, but I got stuck. It seemed difficult to match both two and three levels deep of ::. I actually think matching an arbitrary number deep would be better. Any ideas?

Thanks,

Asa 



More information about the spug-list mailing list