Skip Menu |
Report information
Id: 73104
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

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



Subject: [BUG] There might be something wrong with the way Rakudo handles 'my $::x'
Date: Fri, 26 Feb 2010 01:09:20 +0100
To: rakudobug [...] perl.org
From: Carl Mäsak <cmasak [...] gmail.com>
Download (untitled) / with headers
text/plain 315b
<diakopter> rakudo: my $::x # who knows on this one <p6eval> rakudo a215ee: OUTPUT«Symbol '$x' not predeclared [...] <masak> std: my $::x <p6eval> std 29857: OUTPUT«ok 00:01 107m␤» * masak submits rakudobug As diakopter says above, who knows on this one? Just in case this is an error, here's the ticket. :)
Download (untitled) / with headers
text/plain 1.1k
NOM: This one now segfaults! bbkr:nom bbkr$ ./perl6 -e 'my $::x = 3' Segmentation fault: 11 My system info: bbkr:nom bbkr$ uname -a Darwin bbkr.org 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26 16:09:02 PDT 2011; root:xnu-1699.22.81~1/RELEASE_I386 i386 i386 bbkr:nom bbkr$ gcc -v Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) bbkr:nom bbkr$ ./perl6 --version This is perl6 version 2011.04-1869-gce13be6 built on parrot 3.7.0 revision RELEASE_3_7_0-188-g6f57d17 The same happens on IRC nom: bot.
Download (untitled) / with headers
text/plain 1.4k
On Tue Sep 13 14:51:23 2011, bbkr wrote: Show quoted text
> NOM: This one now segfaults! > > bbkr:nom bbkr$ ./perl6 -e 'my $::x = 3' > Segmentation fault: 11 > > My system info: > > bbkr:nom bbkr$ uname -a > Darwin bbkr.org 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26 > 16:09:02 > PDT 2011; root:xnu-1699.22.81~1/RELEASE_I386 i386 i386 > > bbkr:nom bbkr$ gcc -v > Using built-in specs. > Target: i686-apple-darwin11 > Configured with: > /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure > --disable-checking --enable-werror > --prefix=/Developer/usr/llvm-gcc-4.2 > --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ > --program-prefix=llvm- > --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ > --with-slibdir=/usr/lib --build=i686-apple-darwin11 > --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-
llvmCore/Developer/usr/local Show quoted text
> --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 > --target=i686-apple-darwin11 > --with-gxx-include-dir=/usr/include/c++/4.2.1 > Thread model: posix > gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build > 2335.15.00) > > bbkr:nom bbkr$ ./perl6 --version > This is perl6 version 2011.04-1869-gce13be6 built on parrot 3.7.0 > revision RELEASE_3_7_0-188-g6f57d17 > > The same happens on IRC nom: bot.
This seems fine now. marking testneeded. 15:05 <diakopter> rakudo: my $::x # who knows on this one 15:05 <p6eval> rakudo 223419: ( no output ) 15:06 <diakopter> r: my $::x = 3 15:06 <p6eval> rakudo 223419: ( no output )
Download (untitled) / with headers
text/plain 291b
Assignment works but it fails to recognize declared variable. $ perl6 -e 'my $::x = 3; say $::x;' ===SORRY!=== Variable $x is not declared at -e:1 And at the same time it is... considered declared. $ perl6 -e 'my $::x = 3; my $::x = 4;' ===SORRY!=== Redeclaration of symbol $::x at -e:1
Download (untitled) / with headers
text/plain 528b
On Sun, 15 Jul 2012 09:00:01 -0700, bbkr wrote: Show quoted text
> Assignment works but it fails to recognize declared variable. > > $ perl6 -e 'my $::x = 3; say $::x;' > ===SORRY!=== > Variable $x is not declared > at -e:1 > > And at the same time it is... considered declared. > > $ perl6 -e 'my $::x = 3; my $::x = 4;' > ===SORRY!=== > Redeclaration of symbol $::x > at -e:1 >
This came up as a side-issue in RT#113042 In order to close that ticket I'm putting a reminder here to also consider anonymous state variables e.g. "$::".


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

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