At Mon, 23 Aug 2004 19:46:34 +0200, [EMAIL PROTECTED] (Juerd) wrote: > I also think POD should be overhauled completely. I've been thinking > about proposing something like: > > sub foo ( > Foo::Bar $bar, > Quux::Xyzzy $xyzzy, > +$verbose, > +$foo > ) description { > Calculates the foo-intersection of $bar and $xyzzy, optionally > blah blah blah... > } returns Array | undef { > # real code here > } > > which would get rendered as: > > &foo (Foo::Bar $bar, Quux::Xyzzy $xyzzy, +$verbose, +$foo) > returns Array | undef; > > Calculate the foo-intersection of $bar and $xyzzy, optionally > blah blah blah...
I also think something like this is a great idea -- I've been doing a lot of programming in Octave and Emacs Lisp, and the latter's generated documentation makes it possible to program what would otherwise be a completely baroque and unmanageable system. But I wouldn't go for the syntax you have above. Why not just do it with a property, then ship with a doc-generator that makes use of it? sub foo($x is rw, $y) is doc <<. Does some stuff, then frobs $x without mercy. . { # ... } /s