develooper Front page | perl.perl5.porters | Postings from November 2014

[perl #123092] Sub inlining inconsistencies

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
November 4, 2014 04:29
Subject:
[perl #123092] Sub inlining inconsistencies
Message ID:
rt-4.0.18-7137-1415075387-381.123092-15-0@perl.org
On Sun Nov 02 23:11:05 2014, demerphq wrote:
> And if you do that then you might as well also make a ":const"
> prototype/attribute whatever.

Which would only be permitted on anonymous subs and would execute the anonymous sub when the ‘sub{...}’ expression is evaluated, capture the return value, and return a new constant sub.

What would sub :lvalue :const do?  Presumably the actual scalar return by the sub, not a copy of it, would then be attached to the constant sub, right?

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=123092

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About