Skip Menu |
 

This queue is for tickets about the Syntax-Keyword-Dynamically CPAN distribution.

Report information
The Basics
Id: 131970
Status: open
Priority: 0/
Queue: Syntax-Keyword-Dynamically

People
Owner: Nobody in particular
Requestors: perl [...] toby.ink
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Not clear whether this is supposed to work; if so, should be tested; if not, should be documented
Download (untitled) / with headers
text/plain 127b
dynamically $var += 1; This doesn't work with `local`, but if it could work with `dynamically` it would be a pretty major win.
Download (untitled) / with headers
text/plain 432b
On Tue Feb 25 13:17:16 2020, TOBYINK wrote: Show quoted text
> dynamically $var += 1; > > This doesn't work with `local`, but if it could work with > `dynamically` it would be a pretty major win.
Hmm. No objection in principle to having it work. It would make cases like dynamically $logger->level += 1; a little neater too. I expect the implementation may be nontrivial to get working though; trying to detect all the cases. -- Paul Evans
Download (untitled) / with headers
text/plain 118b
I guess something that complicates it is that ($x+=1) is itself an lvalue. $ perl -E'my $x=1; ($x+=2) = 4; say $x'


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.