The common solution is to NOT add "author-only" tests to TEST_REQUIRES, but
instead to modify your "skip_all" as follows:
unless( ( $ENV{'RELEASE_TESTING'} || $ENV{'AUTHOR_TESTING'} ) && eval 'use
Test::POD; 1;' ) {
plan skip_all => 'These tests are for authors only.';
exit 0;
}
Or you could split the ENV testing and the "use" testing into different
logic paths so that you can give diagnostic messages more appropriate to
the failure point. In other words, if the ENV isn't set, you can skip with
a message of "Skipping author tests, set ENV{.....} for author testing.",
and if the eval fails you can state "Author tests require Test::POD".
On Thu, May 21, 2015 at 8:07 PM, Alceu R. de Freitas Jr. <
glasswalk3r@yahoo.com.br> wrote:
Show quoted text> Since I'm the author of this module, I think I can have a say about that.
> :-)
>
> Meanwhile I agree to remove Test::Pod from PREREQ_PM, I think that loosing
> the opportunity to test the module if test Test::Pod is indeed available is
> not interesting.
>
> I could use a conditional test to execute the test or not as simple as
> described in Test::Pod Pod:
>
> use Test::More;
> eval "use Test::Pod 1.00";
> plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
> all_pod_files_ok();
>
> That should be enough for all cases.
>
> My questions are:
>
> 1 - Should I declare Test::Pod on TEST_REQUIRES? Documentation is not very clear on how that works if the module is not available. If I think I should require a user to download Test::Pod to run the tests? Yes, I think so. It's a very small price to give a hand to the project (since Test::Pod is not exactly the same thing on installing a large set of modules dependencies as happens with Moose, for example), but I'm open to discuss about it.
> 2 - Does it matter? I wrote this module years ago when I was on a network that wouldn't allow me to send those tests results, so I'm not sure if this module still works with more recent versions of Microsoft Outlook. Maybe Barbie could have say about that (since it depends mostly on Mail::Outlook)?
>
> PS: just checked
http://cpansearch.perl.org/src/ARFREITAS/Test-Reporter-Transport-Outlook-0.01/Makefile.PL and this module really needs an update.
>
> Cheers,
>
> Alceu
>
> ------------------------------
> *De:* Karen Etheridge via RT <
> bug-Test-Reporter-Transport-Outlook@rt.cpan.org>
> *Para:*
> *Enviadas:* Quinta-feira, 21 de Maio de 2015 15:28
> *Assunto:* [rt.cpan.org #104607] incorrect case
>
> Queue: Test-Reporter-Transport-Outlook
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=104607 >
>
> On 2015-05-21 09:43:17, CHORNY wrote:
> > depends on Test::POD. Correct is Test::Pod.
>
> However, the distribution should not have a dependency on this module at
> all. Pod tests should not run for normal user installs - either move the
> test to xt/, or guard it with:
>
> plan skip_all => 'These tests are for authors only!' unless
> $ENV{AUTHOR_TESTING} or $ENV{RELEASE_TESTING};
>
>
>
--
David Oswald
daoswald@gmail.com