Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Portably unit testing scripts

by wanna_code_perl (Friar)
on Oct 26, 2019 at 09:39 UTC ( [id://11107985]=note: print w/replies, xml ) Need Help??


in reply to Re: Portably unit testing scripts
in thread Portably unit testing scripts

IMHO the far more important metrics here are whether you're testing everything, as in code coverage and so on.

Yes, you seem to understand what I'm trying to do: I want to test everything adequately (and part of that is code coverage). Portability is a very important concern. In fact, my main reservation about using $^X, system, Capture::Tiny, etc, (which is very similar to what I used to do for in-house releases for known platforms) is a concern, potentially unfounded, that I might artificially limit the platforms my distribution will install on. On the one hand, maybe I am worried for nothing, but on the other hand, I'd hate for my entire module installation to fail because a test for the script did not succeed, when the library itself would have tested and installed just fine.

Thanks for the link to your distributions that use a similar approach. Those CPAN testers matrices give me hope that I might be worried for no good reason.

I know there is more I could do, but a lesser desire is that I keep my finite efforts focused on the library itself, with proportionately less time spent on some 40-line script I am including as a useful afterthought. But, hey, that's software sometimes, I suppose.

Replies are listed 'Best First'.
Re^3: Portably unit testing scripts
by haukex (Archbishop) on Oct 26, 2019 at 10:26 UTC
    I might artificially limit the platforms my distribution will install on

    Yeah, I like portability myself, and I had the same worry when I started releasing CPAN modules, but experience has shown me that portability is possible. And even if you release a module and it initially fails on a bunch of CPAN Testers, it's possible to bring it back to 100%. As you probably saw, the Shell::Tools tests (which my example code above is based on) pass on Cygwin, Darwin (Mac OS X), FreeBSD, GNU/kFreeBSD, Haiku, Linux, MSWin32, NetBSD, OpenBSD, and Solaris.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-24 06:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found