POD doesn't capture code semantics

[email protected] (Andy Armstrong)
Newsgroups perl.qa,perl.pod-people
Message-ID <[email protected]>
Last night, not for the first time, I found myself irritated that POD  
has no semantic concept of the code it describes. POD's a great markup  
language but it'd be nice if it were possible to associate chunks of  
POD with bits of code. Instead of

     =head2 C<foo>

     foo is a method...

     =head2 C<bar>

bar is a subroutine...

why not

     =method foo

     =sub bar

?

For formatting purposes =method and =sub could just be macros that  
expanded to =head2 C<$1> but it'd be far easier to extract, e.g., the  
documentation for just a single method if there was a formal  
relationship between POD directives and the things they described.

Of course I realise such a thing would break every POD tool in  
existence...

-- 
Andy Armstrong, Hexten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.