Hi all,

The only easter egg I got today was this conundrum:

Pod::Coverage reports aliased methods as undocumented because 
Method::Alias does the eval("package $your_package; sub $alias 
{shift->$canonical([EMAIL PROTECTED])}") thing.

Of course, it doesn't bother reporting things like accessors and 
constants as undocumented because those are installed via the 
*{"${your_package}::$name"} = sub {...} way.

So, is it good to be slapped for not documenting your aliases?  (Or, for 
that matter: accessors and constants.)

Or is that clutter?

I tend to put all of this sort of meta stuff at the beginning of the 
code, so if you're reading the code, it is sort of self-documenting, at 
which point anything about it in pod becomes clutter (and quite prone 
to going stale.)

So, do I need a new Method::Alias?  (Aside:  I had some code that 
changed the way it installed the subs, but Adam seems to have disliked 
it or forgotten it.)  I was thinking maybe it could read the aliases 
from the pod, but that would break in a PAR and generally leaves a bad 
taste, so no dice.  I also somehow can't ever seem to remember the 
order of arguments (guess I keep getting it confused with `ln`), but 
that might just be me.

Alternatively, maybe what I want is just for Pod::Coverage to not check 
any symbols that aren't static subs in the package in question.  (I 
guess that would solve the whole @INC bug as well and we could just 
statically scan the code.)  I mean, if you're creating the symbols via 
glob-juggling and etc, do you want your podcoverage tests checking 
those?

On another note, I hacked together a Pod::Coverage subclass that allows 
"=for podcoverage_private foo_\w+" and "=for podcoverage_trustme bar" 
in your pod.  Seems sort of natural to have the pod-reading tool 
reading pod and all that.  Is that the sort of thing that should be a 
patch to Pod::Coverage?
 
http://svn.dotreader.com/svn/dotreader/trunk/inc/dtRdrBuilder/PodCoverage.pm

Thanks,
Eric
-- 
"Politics is not a bad profession. If you succeed there are many
rewards, if you disgrace yourself you can always write a book."
--Ronald Reagan
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to