http://qs1969.pair.com?node_id=484492


in reply to Re: detecting pod in files?
in thread detecting pod in files?

You can't do it this simply. Although a pod directive starts at the beginning of a line with an =, that has to happen when Perl isn't expecting something else. (Curiously, BBEdit gets this wrong too).

# this isn't pod $time =time ;
Or
$string =<<"HERE"; =value =item HERE

You can can't just look for a particular pod directive (such as =pod, in the original post, because it might not show up. Indeed, I have rarely used =pod.

There are plenty of Pod modules, so use those instead of rolling your own. :)

--
brian d foy <brian@stonehenge.com>