I've got a distribution who's job it is to wrap an external C/C++ library. There are dozens of functions I'm wrapping, most are loaded directly, a handful of others have C wrappers in my XS that call the wrapped functions in order to make them work properly with Perl.

In my Test::Pod::Coverage RELEASE_TESTING tests, all of the XS functions are 'bare' (ie. no POD coverage). I don't want to write POD for them, as in each of the Perl subs that present them, I put something like this:

=head2 phys_to_gpio($pin_num) Maps to C<int physPinToGpio(int pin)> Converts the pin number on the physical board to the C<GPIO> represent +ation, and returns it. Parameters: $pin_num Mandatory: The pin number on the physical Raspberry Pi board. =head2 phys_to_wpi($pin_num) Maps to C<int physPinToWpi(int pin)> Converts the pin number on the physical board to the C<wiringPi> numbe +ring representation, and returns it. Parameters: $pin_num Mandatory: The pin number on the physical Raspberry Pi board.

That allows the user to see what the C call actually is.

So, my question is, how can I avoid Test::Pod::Coverage failures for subs I do not want to cover, because they are XSUBs, and really not used directly?:

t/pod-coverage.t ..... 1/1 # Failed test 'Pod coverage on WiringPi::API' # at /home/pi/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/ +Test/Pod/Coverage.pm line 133. # Coverage for WiringPi::API is 49.6%, with 60 naked subroutines: # ads1115Setup # analogRead # analogWrite # bmp180Pressure ...

All of my Perl subs are snake_case, so anything with camelCase is C/XS.


In reply to Ignoring subs in Test::Pod::Coverage? by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.