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

Re: Namespaces (was Re: Revisiting trim)

Thread Previous | Thread Next
May 29, 2021 06:54
Re: Namespaces (was Re: Revisiting trim)
Message ID:
On Fri, 28 May 2021 at 22:49, Paul "LeoNerd" Evans
<> wrote:
> Unclear from this discussion whether it was explicitly pointed out, but
> one thing I'd like to see from the "keyword" functions is that they
> *not* appear in the package's symbol table.

Personally I would be opposed to anything that might mean that things
work differently in older perls from newer.

However concern over this point is part of the reason I advocate the
"keyword" api supporting the following:

   use keyword "string::trimmed";
   use keyword "string::trimmed" => "trim";

The first case would ensure that string::trimmed is available to you
via the fully qualified name. The second form would modify your
namespace as normal so that "string::trimmed" is available as "trim".
We can do this in a totally backwards compatible way. Making "trim" be
invisible would be nice, but only if it would also be invisible in
older perls.


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