in reply to Putting comments in an object

do you mean docstrings ?

I would strongly recommend a solution where docstrings and pod are easily mirrored, but I'm searching myself.

As a suggestion, some people do things (roughly) like this:

$class::doc=<<"__doc__"; =pod docstring bla bvla bla =cut __doc__
(didn't test if this code really works, ATM I'm in a hurry)

Cheers Rolf

Replies are listed 'Best First'.
Re^2: Putting comments in an object
by Corion (Patriarch) on Apr 02, 2010 at 12:58 UTC

    Yes, this works. I've used the technique to write documented lists:

    my @items = map { /^=item (.*)/ ? $1 : () } split /\n/, <<'=cut'; =begin =over 4 =item Hello The first item must always be C<Hello> =item World The second item must always be C<World> =back =cut print "Items: @items\n";