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

Re: Initial hack at 'builtin::' namespace | online TODO list ofindividual functions

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
December 16, 2021 15:14
Subject:
Re: Initial hack at 'builtin::' namespace | online TODO list ofindividual functions
Message ID:
20211216151426.56031288@shy.leonerd.org.uk
On Wed, 15 Dec 2021 21:14:44 +0000
"Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> wrote:

> It could probably warn at `import` time, except that won't catch the
> cases where people invoke it directly by its fully-qualified name.
> Offhand I can't think of a good way to warn on those bits.

Actually I think a better bet would be to put the warning in the
callchecker, so it happens for every callsite of both
lexically-imported and fully-qualified callers.

Wouldn't do much about

  my $code = \&builtin::weaken;
  $code->( $var );

but I suspect if you're doing *that* you hopefully know what you're
doing anyway.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

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