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
Incorrect coderef in MODIFY_CODE_ATTRIBUTES #9780
Comments
From alan@pit27.pair.comCreated by alan@pit27.pair.comIf you use an attribute on a sub definition which has already had a I can reproduce this bug in perl 5.8.9 and perl 5.10.0, on freebsd 6. * Sample code: #!/usr/local/bin/perl sub MODIFY_CODE_ATTRIBUTES { BEGIN { print "* sub foo has a reference constructed at compile time\n" } BEGIN { warn " BEGIN before: ". \&foo. "\n" } BEGIN { print "\n* sub bar has multiple attribute declarations\n" } sub bar : before; BEGIN { print "\n* sub baz is free from interference\n" } sub baz : declaration {} print "\n* foo is: ", \&foo, "\n"; __END__ * Sample buggy output: * sub foo has a reference constructed at compile time * sub bar has multiple attribute declarations * sub baz is free from interference * foo is: CODE(0x806b130) In the output above, sub foo's MODIFY_CODE_ATTRIBUTES $code ref does not This bug prevents the use of MODIFY_CODE_ATTRIBUTES to consistently store I haven't looked at the code, but my guess is that the attribute system is Thank you for your help, Perl Info
|
From p5p@spam.wizbit.beRunning it with blead: Version: 5.011000 * sub bar has multiple attribute declarations * sub baz is free from interference * foo is: CODE(0x8857858) Running it with perl-5.6.0: Version: 5.006 * sub bar has multiple attribute declarations * sub baz is free from interference * foo is: CODE(0x9ae382c) => Both produce uncorrect/unexpected output. |
p5p@spam.wizbit.be - Status changed from 'new' to 'open' |
From @rgsResolved in blead perl by this change : http://perl5.git.perl.org/perl.git/commitdiff/09330df80caf214f375fcf0c04857347e3b17c69 |
@rgs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#66970 (status was 'resolved')
Searchable as RT66970$
The text was updated successfully, but these errors were encountered: