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

Owner: Nobody
Requestors: ash_gti <ash.gti [at] gmail.com>
mark [at] kli.org
Cc:
AdminCc:

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



Subject: [BUG] REPL crashes when you use $* type variables.
Date: Sun, 26 Sep 2010 15:44:47 -0500
To: perl6-bug [...] perl.org
From: John Harrison <ash.gti [...] gmail.com>
Download (untitled) / with headers
text/plain 162b
$ perl6
> my $*a = 1;
1
> say $*a;
===SORRY!===
Contextual $*a not found


Not sure why this is happening, I only see it happening in the REPL. 

--
John Harrison

RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 332b
On Sun Sep 26 13:45:30 2010, ash_gti wrote: Show quoted text
> $ perl6
> > my $*a = 1;
> 1
> > say $*a;
> ===SORRY!=== > Contextual $*a not found > > > Not sure why this is happening, I only see it happening in the REPL. > > -- > John Harrison
No longer dies: Show quoted text
> my $*a = 1;
1 Show quoted text
> say $*a
Dynamic variable $*a not found Show quoted text
>
-- Will "Coke" Coleda
From: "Mark E. Shoulson" <mark [...] kli.org>
Date: Mon, 13 Jan 2014 21:32:47 -0500
Subject: REPL error: Dynamic variable declarations do not persist
To: rakudobug [...] perl.org
This seems to happen only with the REPL:

> my $*a;
(Any)
> $*a=10;
Dynamic variable $*a not found
  in method <anon> at gen/parrot/CORE.setting:12197
  in any  at gen/parrot/Metamodel.nqp:2691
  in any find_method_fallback at gen/parrot/Metamodel.nqp:2679

> my $*a; $*a=10; say $*a;
10
>


Note that the declaration is still there if I do it all on one line; it just disappears between lines.

RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 138b
Possibly this is related to the issues in ticket #122914 (bindings and term definitions are "forgotten" in the REPL for subsequent lines).
Download (untitled) / with headers
text/plain 266b
Changed title to reflect that it does not crash anymore, but still does not remember dynamic variables from one command to the next: ➜ my $*a; $*a = 10; 5 ➜ $*a = 10; Dynamic variable $*a not found in block <unit> at <unknown file> line 1


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