# New Ticket Created by  Brian Duggan 
# Please include the string:  [perl #131913]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131913 >


If I have these three files:

    # test.p6
    use lib '.';
    use first;
    say $foo;

    # first.pm6
    use second;
    sub EXPORT {
        return { '$foo' => $foo }
    }

    # second.pm6
    sub EXPORT {
        return { '$foo' => %*ENV<SETME> }
    }

and I say

    $ SETME=bar perl6 test.p6

I then get (as I expect):
    
    bar

But, if I run it again with SETME as something else:

    $ SETME=baz perl6 test.p6

I still get

    bar

Replacing the EXPORT sub with

    our $foo is export = %*ENV<SETME>

gives me what I expect (the current value of SETME).

Reply via email to