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
eval return value is only sometimes copied #11794
Comments
From @cpansprout#!perl -l This gives me: SCALAR(0x826d50) Flags: Site configuration information for perl 5.15.4: Configured by sprout at Wed Nov 2 09:06:14 PDT 2011. Summary of my perl5 (revision 5 version 15 subversion 4) configuration: Locally applied patches: @INC for perl 5.15.4: Environment for perl 5.15.4: |
From @jkeenanOn Sun Dec 11 13:07:43 2011, sprout wrote:
This bug report is too terse for a mere mortal like me to understand. Can anyone explicate? Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @epaWhen you eval() a string of code and it returns a value, do you get back that value or a copy of it? The code example shows that in the first eval() call the same scalar $a is being returned, since the SCALAR(0xwhatever) printed is the same as for the original print() call. However, the second eval() call, while the code being evaluated is equivalent, somehow returns a copy of the scalar, printing a different SCALAR(0xsomethingelse). I can reproduce this on 5.18.2 also. The behaviour should be more consistent: either always copying the value, or (probably more useful) always returning the value without copying. |
From @iabynOn Sun, Dec 11, 2011 at 01:07:44PM -0800, Father Chrysostomos wrote:
I think that's been fixed by my context stack reworking for 5.24.0. -- |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#105910 (status was 'resolved')
Searchable as RT105910$
The text was updated successfully, but these errors were encountered: