Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: RFC: pragma pragmatic

by shmem (Chancellor)
on Aug 09, 2017 at 17:17 UTC ( [id://1197121]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: pragma pragmatic
in thread RFC: pragma pragmatic

It may well be that something like use feature say would be regarded as a rabbit-hole, unless great care were to be taken to ensure that every single one of them was wholly independent of the other, such that they could be specified or omitted in any order or combination. Then there would always be the niggling question of what a particular feature-keyword did or did not include. Maybe that is why use version_number appears to be the use-case of choice.

As far as I know, great care has been taken, and each feature controlled by feature is independent. Please read the resource the former link points to.

Said in a sentence or three that any Monk could instantly understand.

This sentence is written in the third paragraph in the OP: "make the scope of imported functions from some arbitrary package purely lexical, even if that package isn't pragma aware."

That is: implement the facitlity for turning on/off the access to imported subroutines in the same way in which features of strict and warnings can be turned on and off in a lexical scope.

If that explanation is still unclear, don't hesitate to ask.

In particular, how does this feature take Perl out of the main-stream of behavior that I am already conditioned to expect?

I'm not sure what you mean by "main-stream of behavior". I am reading that as "documented behavior". This feature doesn't take perl out of that, it doesn't add bizarre behavior or undocumented magic. It just combines already well documented features (or "perl behavior") into a new, simple to use, package, which provides something currently not available easily: limiting the scope of imported subroutines/functions to a lexical scope. Object oriented methods aren't affected, since the existence of the package in perls symbol table stash is not altered in any way.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1197121]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-19 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found