On Mon, Oct 02, 2006 at 02:01:34PM -0700, Jonathan Lang wrote:
: Dave Whipp wrote:
: >Or we could view it purely in terms of the design of the core "strict"
: >and "warnings" modules: is it better to implement them as centralised
: >rulesets, or as a distributed mechanism by which "core" modules can
: >register module-specific strictures/warnings/diagnostics.
: 
: Question: if module A uses strict, and module B uses module A, does
: module B effectively use strict?  I hope not.
: 
: I was under the impression that pragmas are local to the package in
: which they're declared.

Yes, pragmas (and indeed all imports) are lexically scoped by default, but...

: If that's the case, then pragmas will not
: work for allowing one module to impose restrictions on another unless
: there's a way to export pragmas.

...S01 also very plainly says:

    It must be possible to write policy metamodules that invoke other
    modules on the user's behalf.

The point is, a single "use" statement can turn Perl 6 into any other
language, and the main point of that other language might even be to
tell you what you can't do.

You might say that every Perl 6 program is guaranteed to be written in
Standard Perl 6--but only up till the first "use".  From that point,
Perl 6 is a family of languages, the definition of which can only
be as accurate as our naming system.  (Which is why module names now
include version and authority.)  The sequence of use statements defines
the language just as a URL defines a location in cyberspace.

Larry

Reply via email to