Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Documenting non-public OO components

by creamygoodness (Curate)
on Sep 09, 2005 at 01:29 UTC ( #490396=note: print w/replies, xml ) Need Help??


in reply to Re: Documenting non-public OO components
in thread Documenting non-public OO components

What about methods, typically called "package" or "protected", which are not part of the public API, but must be called by other classes that are part of the distro? Those should not have leading underscores, IMO, because it contradicts standard practice. From perlstyle:

You can use a leading underscore to indicate that a variable or function should not be used outside the package that defined it.

The Pod::Coverage problem is solvable with minimal effort, as both you and xdg have pointed out (thanks). However, there is still the need to document these methods while indicating clearly that they are not available to users.

There seems to be a range of opinion on as to the best solution. The ones that I like best for this project at least are the ones closest to javadoc, but I can appreciate the merits of the document-by-test and the bury-private-docs-deeply schools as well.

--
Marvin Humphrey
Rectangular Research ― http://www.rectangular.com

Replies are listed 'Best First'.
Re^3: Documenting non-public OO components
by petdance (Parson) on Sep 09, 2005 at 19:41 UTC
    =head1 Public methods =head2 $obj->wango =head2 $obj->doofus =head1 Internal-only methods =head2 $obj->whatever

    xoxo,
    Andy

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://490396]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-12-03 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?