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

Re: removing the old-style package separator

Thread Previous | Thread Next
From:
Karen Etheridge
Date:
August 17, 2021 20:14
Subject:
Re: removing the old-style package separator
Message ID:
CAPJsHfCOnk8WjBm=w8JV7tvOA5b+pk4pLEvOPLMajLKEV_bOjA@mail.gmail.com
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.

* 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().

On Tue, Aug 17, 2021 at 4:15 AM Arne Johannessen <arne-9544@thaw.de> wrote:

> I'd be more concerned about Test::More::isn't(), which seems to be one of
> the very few cases (perhaps the only one?) in which users would
> intentionally use the old-style separator in new Perl 5 code. But I expect
> the usual deprecation period will enable basically everyone to handle these
> cases fine.
>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About