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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-9755-1582654636-871.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 127
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.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-9755-1582654636-871.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-9755-1582654636-871.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-10915-1582655245-176.131970-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 432
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
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-10915-1582655245-176.131970-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-9755-1582654636-871.0-0-0 [...] rt.cpan.org> <rt-4.0.18-10915-1582655245-176.131970-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-4984-1582663154-858.131970-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 118
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.