Skip Menu |
Report information
Id: 131913
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: bduggan [at]

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Date: Wed, 16 Aug 2017 15:53:28 -0400
To: rakudobug [...]
Subject: EXPORT and is export behave differently with dynamic variables
From: Brian Duggan <bduggan [...]>
Download (untitled) / with headers
text/plain 576b
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).

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at