Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BEGIN { eval "..." } Confuses Rakudo #2896

Closed
p6rt opened this issue Oct 4, 2012 · 5 comments
Closed

BEGIN { eval "..." } Confuses Rakudo #2896

p6rt opened this issue Oct 4, 2012 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 4, 2012

Migrated from rt.perl.org#115134 (status was 'resolved')

Searchable as RT115134$

@p6rt
Copy link
Author

p6rt commented Oct 4, 2012

From @edwinst

eval inside a BEGIN block seems to confuse rakudo​:

$ ./perl6 -e 'BEGIN { eval "0" }
say "alive"'
===SORRY!===
Confused
at -e​:1

With a semicolon, the confusion goes away​:

$ ./perl6 -e 'BEGIN { eval "0" };
say "alive"'
alive

Also without the eval there is no confusion​:

$ ./perl6 -e 'BEGIN { say "0" }
say "alive"'
0
alive

This is independent from using -e or a file​:

$ cat test.pl
BEGIN { eval '0' }
say 'alive'
$ ./perl6 test.pl
===SORRY!===
Confused
at test.pl​:1

$ ./perl6 --version
This is perl6 version 2012.09.1-5-g3d31af9 built on parrot 4.4.0 revision RELEASE_4_4_0

@p6rt
Copy link
Author

p6rt commented Oct 5, 2012

From sohtil@gmail.com

spectest added​:

commit a7483bec004cf98a4e8fe774e56a42bf28648485
Author​: Edwin Steiner <edwin.steiner@​gmx.net>
Date​: Fri Oct 5 19​:43​:55 2012 +0200

  Add test for RT #​115134​: [BUG] BEGIN { eval "..." } Confuses Rakudo.

diff --git a/S04-phasers/eval-in-begin.t b/S04-phasers/eval-in-begin.t

@p6rt
Copy link
Author

p6rt commented Oct 5, 2012

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Feb 24, 2013

From @moritz

Works now, test passes.

@p6rt
Copy link
Author

p6rt commented Feb 24, 2013

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Feb 24, 2013
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant