Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: documentation best practices for internal modules

by stevieb (Canon)
on Jan 08, 2018 at 15:33 UTC ( #1206909=note: print w/replies, xml ) Need Help??


in reply to documentation best practices for internal modules

I'm with the others; document everything. Because that's been covered, I'll leave it alone.

If you don't want your internal modules/subs being used by external code, you can catch that. Here's a rudimentary example:

use warnings; use strict; package Internal; { sub foo { my $caller = (caller(1))[3]; my $me = (caller(0))[3]; if ($caller !~ /^Internal::/){ die "$me is only available internally\n" } ... } } package External; { sub bar { Internal::foo(); } } package main; External::bar(); __END__ Internal::foo is only available internally

Replies are listed 'Best First'.
Re^2: documentation best practices for internal modules
by Anonymous Monk on Jan 08, 2018 at 22:44 UTC

    If you don't want your internal modules/subs being used by external code, you can catch that.

    Abide by the ethos?

    Why assume you're smart enough to know what your users are paying for today/tomorrow?

    This is all the checks you need

    =head1 FOR INTERNAL USE ONLY This is private api for internal use only, it can change at any time, +standard disclaimers apply, use at your own risk.... =cut

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2020-12-04 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (58 votes). Check out past polls.

    Notices?