in reply to Re: (How) Do you document/test your private subroutines?
in thread (How) Do you document/test your private subroutines?

This is a very interesting approach LanX, could you elaborate on the specifics on how you do/did this (ie. filter the pieces public/private)?

Thanks,

-stevieb

  • Comment on Re^2: (How) Do you document/test your private subroutines?

Replies are listed 'Best First'.
Re^3: (How) Do you document/test your private subroutines?
by LanX (Saint) on Nov 07, 2018 at 00:54 UTC
    Um ... it's been some time and I never "perfected" the hack. :)

    Have a look here https://github.com/LanX/Macro/tree/master/lib

    Macro.pod.tpl has a template (read hack)

    podbuilder.pl reads the template and Macro.pm and creates Macro.pod and README.pod

    update

    As you see it's a primitive pod parser which grabs some parts between =head directives till =cut.

    you could just filter out any underscored _private headline or use a =head1 Internal to mark them.

    (not sure why it's missing in the git-hub version)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Re^3: (How) Do you document/test your private subroutines?
by haukex (Archbishop) on Nov 07, 2018 at 20:43 UTC

    One possibility:

    =pod =for comment Foo! Or: =begin comment Bar! =end comment =cut

    I also seem to have a dim memory of someone suggesting =begin internal for marking things that are actually still documentation, but internal docs, but I'm not sure when/where that was.