-
Notifications
You must be signed in to change notification settings - Fork 1
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
STable conflict with .^add_method #4643
Comments
From tokuhirom@gmail.comHere is a code that throws exception. mkdir lib/ cat > lib/Child.pm6 <<EOF; unit class Child is Parent; cat > lib/Parent.pm6 <<EOF; ::?CLASS.^add_method: 'x', method () { }; perl6-m -Ilib --target=mbc --output=lib/Parent.pm6.moarvm lib/Parent.pm6 perl6-m -Ilib -e 'use Child' Output is: I guess this code should work(I know it works if i enclose MOP methods by BEGIN block). |
From @jnthnOn Mon Oct 12 21:21:48 2015, tokuhirom wrote:
If you want to pre-compile such code, you must put the MOP method call inside of a BEGIN block. Otherwise, it performs the change on each module load, causing the updated class to be serialized into the two downstream modules, and then you get a conflict when trying to load the two versions.
Yes, we can de-jargon the message somewhat; we'll keep this ticket around for that purpose. Thanks, Jonathan |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#126341 (status was 'open')
Searchable as RT126341$
The text was updated successfully, but these errors were encountered: