develooper Front page | perl.perl5.porters | Postings from August 2021

Re: removing the old-style package separator

Thread Previous | Thread Next
Eirik Berg Hanssen
August 17, 2021 21:57
Re: removing the old-style package separator
Message ID:
On Tue, Aug 17, 2021 at 10:15 PM Karen Etheridge <> wrote:

> I've very occasionally used Test::More::isn't * -- and I would not mind at
> all to change these uses to Test::More::isn_t or ::isnt.

  When I wrapped (warped?) some Test::More functions for Test::Trap, I
never even looked at Test::More::isn't (and I would have found it a pain to
wrap if I had) – I just used Test::More::isnt straight.

  Quoth – "For those grammatical
pedants out there, there's an isn't() function which is an alias of isnt()."

  Just an alias I'm not even using – I guess I'm not enough of a
grammatical pedant to miss that apostrophe if it goes …

* it isn't (ha!) actually all that useful because normally you want to know
> what something *is*, and if it *isn't* a value, it isn't necessarily what
> you want it to be (this is the same as why "I got an exception" is a
> terrible test -- you really should check that you got the *right*
> exception, as it could just as easily be "syntax error in your code" which
> ought to result in a failing test) -- so uses are better off changed to
> is() or perhaps like().

  Also a good point.  (Grepping through my in-house code and some of my old
employers' code … I haven't even used any of the Test::Trap::*_isnt methods
… I guess I added it to the list of functions to wrap "just because I
could" …)


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About