Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-MinimumVersion CPAN distribution.

Report information
The Basics
Id: 70696
Status: rejected
Priority: 0/
Queue: Test-MinimumVersion

People
Owner: Nobody in particular
Requestors: HMBRAND [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Enable multiple planned runs from same scope
I'm currently writing a framework to simplify my releases to be thoroughly checked against all possible wishes from the cruel outside world, like e.g. that all README and pod files are correct UTF-8 (as Debian requires) and that the "claims" I make in Makefile.PL are the same as reflected in META.yml/META.json. So I have a "module" that bundles all possible checks, which includes sub check_minimum { ... all_minimum_version_ok ($reqv, $locs); } # check_minimum That to support $meta->check_minimum ([ "t", "Gnokii.pm", "Makefile.PL" ]); $meta->check_minimum ("5.010", [ "examples" ]); where the first call makes sure that all those files meet the claim for required perl version and the second to check if my examples meet another claim. Examples are not installed by default and the docs make clear that the requirement is not the same. These are *examples*. Running the checker ... Checking generated YAML ... Check if ChangeLog and README are still valid UTF8 ... Check required and recommended module versions ... Checking if 5.008004 is still OK as minimal version for t, Gnokii.pm, Makefile.PL 1..4 ok 1 - t/00_pod.t ok 2 - t/01_pod.t ok 3 - t/10_all.t Use of uninitialized value in null operation at /pro/lib/perl5/ site_perl/5.14.1/Perl/MinimumVersion.pm line 328. ok 4 - Makefile.PL Checking if 5.010 is still OK as minimal version for examples ok 5 - examples/backup ok 6 - examples/dirtree ok 7 - examples/kgnokii-sms # Looks like you planned 4 tests but ran 7. Exit 255 As you can see, the second call counts on where the first call left off, causing the second call to fail Fixing the null operation warning is not vital, but would be considered a bonus :)
You should be able to fix the plan issue by running each set of tests inside a subtest (each with their own plan).
As ether said, you should either use subtests or pass the no_plan argument. I think this would solve your problem. Let me know if I have missed something! -- rjbs