# New Ticket Created by  grond...@yahoo.fr 
# Please include the string:  [perl #115132]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=115132 >


Hi,

My version of rakudo:
This is perl6 version 2012.09.1-7-gfb11f13 built on parrot 4.8.0 revision 
RELEASE_4_8_0


I was trying to use an environment variable to assign a boolean
to a constant:

BEGIN { %*ENV<FOO> //= "bar" }
constant FOO_IS_BAR = %*ENV<FOO> ~~ "bar" | "Bar";

I got the following error:
===SORRY!===
Cannot assign to a non-container

shell returned 1

The error can be reproduced quicker this way (but it has less meaning):

constant x = "foo" ~~ /bar/;

The same line does not produce any error with niecza.


Regards

Reply via email to