# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #65738]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=65738 >


<masak> I've asked this before, but gotten contradictory answers: if
I'm in a script and import modules A and B, and A exports a bunch of
subs which override Perl 6 core subs, will these still be overriddent
in module B?
<moritz_> masak: no.
<moritz_> masak: B unly sees the overridden symbols if it uses lift
<masak> moritz_: among the two possible answers, that's the one I like.
<JDlugosz> masak:  no.  In Perl 5, the override is lexical.  In Perl
6, it should be the same.
<masak> moritz_: I've actually been bitten by Rakudo implementing the
other answer. :/
<moritz_> masak: then do your job (and rt it) ;-)
<masak> moritz_: yes.

$ cat A.pm
sub print(*...@args) is export(:DEFAULT) {
    say "I'm in ur module, overriding ur functions!";
}
$ cat B.pm
print "OH HAI"
$ perl6 -e 'use A; use B'
I'm in ur module, overriding ur functions!

Finally, getting some support from S11: "It must be possible for any
official module to be separately compiled without knowledge of the
context in which it will be embedded, and this separate compilation
must be able to produce a deterministic profile of the interface."

Reply via email to