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

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

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



From: Kamil Kułaga <teodozjan [...] gmail.com>
Subject: [BUG] unexpected behaviour during EVAL()
Date: Mon, 14 Jul 2014 11:31:41 +0200
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 1.4k
Evaling objects won't work if code that eval was preompiled independently. In this case class Planet and Class SpaceStation are somewhat inaccesible in imported sub. Even though putting slurp $path as argument of eval will fail. It was working on parrot but before big changes that made parrot backend unusable (random issues) in my project. =begin pod #FAILS on MOAR @planets = from_file($path_planets); #the same as below # https://github.com/teodozjan/perl-store/blob/master/lib/PerlStore/FileStore.pm @stations = from_file($path_stations); =end pod #moar hack note 'Readin $path_planets'; my $plan = slurp $path_planets; @planets = EVAL $plan; #moar hack note 'Readin $path_stations'; my $stat = slurp $path_stations; @stations = EVAL $stat; Show quoted text
>>> LOADING /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client
+ /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (12 - 16) | multi sub MAIN(:$tasks!, Bool :$update?){ | | my Client $client .= new; | | create_session; Show quoted text
> r
>>> LOADING EVAL_0 >>> LOADING EVAL_1 >>> LOADING EVAL_2
+ Uncaught Exception | Cannot invoke this object (REPR: Null, cs = 0) + /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (23 - 27) | BodyBuilder.process_all_bodies; | } else { | BodyBuilder.read; | } | for @todo -> $willdo { Show quoted text
> q
- Run END blocks (y/N)? $ perl6 --version This is perl6 version 2014.06-118-gb25b868 built on MoarVM version 2014.06-63-g0fb638b -- Pozdrawiam Kamil Kułaga
Hmmm… Parrot is in the past as of today, and I wish it was possible to try this on MoarVM. What's the way to reproduce this issue?

On 2014-07-14 02:31:54, teodozjan wrote:
Show quoted text
> Evaling objects won't work if code that eval was preompiled
> independently. In this case class Planet and Class SpaceStation are
> somewhat inaccesible in imported sub. Even though putting slurp $path
> as argument of eval will fail. It was working on parrot but before big
> changes that made parrot backend unusable (random issues) in my
> project.
>
> =begin pod
> #FAILS on MOAR
> @planets = from_file($path_planets);
> #the same as below
> store/blob/master/lib/PerlStore/FileStore.pm
> @stations = from_file($path_stations);
>
> =end pod
>
>
> #moar hack
> note 'Readin $path_planets';
> my $plan = slurp $path_planets;
> @planets = EVAL $plan;
>
> #moar hack
> note 'Readin $path_stations';
> my $stat = slurp $path_stations;
> @stations = EVAL $stat;
>
>
>
> >>> LOADING /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client
> + /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (12 - 16)
> | multi sub MAIN(:$tasks!, Bool :$update?){
> |
> | my Client $client .= new;
> |
> | create_session;
> > r
> >>> LOADING EVAL_0
> >>> LOADING EVAL_1
> >>> LOADING EVAL_2
> + Uncaught Exception
> | Cannot invoke this object (REPR: Null, cs = 0)
> + /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (23 - 27)
> | BodyBuilder.process_all_bodies;
> | } else {
> | BodyBuilder.read;
> | }
> | for @todo -> $willdo {
> > q
> - Run END blocks (y/N)?
>
> $ perl6 --version
> This is perl6 version 2014.06-118-gb25b868 built on MoarVM version
> 2014.06-63-g0fb638b


From: Kamil Kułaga <teodozjan [...] gmail.com>
To: perl6-bugs-followup [...] perl.org
Date: Mon, 4 Dec 2017 12:36:43 +0100
Subject: Re: [perl #122289] [BUG] unexpected behaviour during EVAL()
Download (untitled) / with headers
text/plain 2.1k
Hi Aleks,

Thanks for reminder i totally forgot about this RT.

Looks like it was fine in 2015
https://github.com/teodozjan/lacuna-cookbuk/commit/f2ebae3efda06f35b1d679e17e14c259bd718b95#diff-73e69e63f060cafc548379f4dcc52105
shall i test it to be 100% sure or you want to close it?

On Sun, Dec 3, 2017 at 6:00 AM, Aleks-Daniel Jakimenko-Aleksejev via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
Hmmm… Parrot is in the past as of today, and I wish it was possible to try this
on MoarVM. What's the way to reproduce this issue?

On 2014-07-14 02:31:54, teodozjan wrote:
> Evaling objects won't work if code that eval was preompiled
> independently. In this case class Planet and Class SpaceStation are
> somewhat inaccesible in imported sub. Even though putting slurp $path
> as argument of eval will fail. It was working on parrot but before big
> changes that made parrot backend unusable (random issues) in my
> project.
>
> =begin pod
> #FAILS on MOAR
> @planets = from_file($path_planets);
> #the same as below
> store/blob/master/lib/PerlStore/FileStore.pm
> @stations = from_file($path_stations);
>
> =end pod
>
>
> #moar hack
> note 'Readin $path_planets';
> my $plan = slurp $path_planets;
> @planets = EVAL $plan;
>
> #moar hack
> note 'Readin $path_stations';
> my $stat = slurp $path_stations;
> @stations = EVAL $stat;
>
>
>
> >>> LOADING /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client
> + /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (12 - 16)
> | multi sub MAIN(:$tasks!, Bool :$update?){
> |
> | my Client $client .= new;
> |
> | create_session;
> > r
> >>> LOADING EVAL_0
> >>> LOADING EVAL_1
> >>> LOADING EVAL_2
> + Uncaught Exception
> | Cannot invoke this object (REPR: Null, cs = 0)
> + /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (23 - 27)
> | BodyBuilder.process_all_bodies;
> | } else {
> | BodyBuilder.read;
> | }
> | for @todo -> $willdo {
> > q
> - Run END blocks (y/N)?
>
> $ perl6 --version
> This is perl6 version 2014.06-118-gb25b868 built on MoarVM version
> 2014.06-63-g0fb638b




--
Pozdrawiam

Kamil Kułaga


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