Call on object overloading &{} returned by a constant -> fails to compile #14044
Comments
From @dolmenCreated by dolmen@cpan.orgThis (maybe parser-related) issue is a combination of: Result: the code doesn't pass compile and perl reports: This is real code that I'm trying to use in a future release of my module Here is a the reduced case that says more: -------8<-------8<-------8<-------8<-------8<-------8<------- { use constant CONST_CLS => bless [], 'Cls'; # == This works ========== # == This doesn't works == -------8<-------8<-------8<-------8<-------8<-------8<------- Olivier Mengué (DOLMEN), from YAPC::EU::2014 Perl Info
|
From @cpansproutOn Sun Aug 24 13:55:26 2014, dolmen wrote:
That’s a known bug, or at least known to me. I don’t remember whether I have filed a ticket, but it’s on my to-do list. Basically there is a whole block of code in op.c:ck_rvconst that is ill-conceived and just needs to be deleted. I may do it tonight. (Then again, I may not.) -- Father Chrysostomos |
|
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Sun Aug 24 19:00:47 2014, sprout wrote:
Done in eff7547. -- Father Chrysostomos |
|
@cpansprout - Status changed from 'open' to 'pending release' |
From @khwilliamsonThanks for submitting this ticket The issue should be resolved with the release today of Perl v5.22. If you find that the problem persists, feel free to reopen this ticket -- |
|
@khwilliamson - Status changed from 'pending release' to 'resolved' |
From @dolmenLe Dim 24 Aoû 2014 13:55:26, dolmen a écrit :
Here are two workarounds I use for perl < 5.21.4: say do{ CONST_CLS }->("OK"); See Term::Chrome as real world use of &{} overloading and "use constant" combination. |
Migrated from rt.perl.org#122607 (status was 'resolved')
Searchable as RT122607$
The text was updated successfully, but these errors were encountered: