develooper Front page | perl.perl5.porters | Postings from January 2018

Re: [perl #132732] use if - behaviour does not match documentation

Thread Previous | Thread Next
From:
Dan Book
Date:
January 25, 2018 02:01
Subject:
Re: [perl #132732] use if - behaviour does not match documentation
Message ID:
CABMkAVWqChD-wgWkERMcm4eoderGYHqPf4Pgj1fjQY7LCXSxQA@mail.gmail.com
On Wed, Jan 24, 2018 at 8:42 PM, <sisyphus1@optusnet.com.au> wrote:
>
>
> Is the difference that (wrt re.pm), we're actually explicitly calling a
> function - whereas, with warnings, "numeric" is not a function that we
> explicitly call, just as "subs" is not a strict.pm function that we
> explicitly call ??
>

As I explained before, the difference is that the 'unimport' method for
re.pm does not unimport subroutines, because that's impractical.

I believe the question was about implementation of 'no' itself, but for use
cases, there are also several pragmas that are useful via 'no' even if they
weren't already activated with 'use', usually because it reads better that
way, for example:

no autovivification;
no bareword::filehandles;

So one could conceive of a case where you'd want to conditionally
"activate" one of these pragmas.

-Dan

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