Skip Menu |
 

This queue is for tickets about the Future-AsyncAwait CPAN distribution.

Report information
The Basics
Id: 131493
Status: open
Priority: 0/
Queue: Future-AsyncAwait

People
Owner: Nobody in particular
Requestors: skaji [...] cpan.org
Cc:
AdminCc:

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



Subject: Future::AsyncAwait does not work with "-async" word
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-6727-1579190305-669.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: 454
Download (untitled) / with headers
text/plain 454b
The following code works: ``` use strict; use warnings; sub foo { warn "[@_]\n" } foo -async; ``` But, if I add "use Future::AsyncAwait", it won't work. That is, ``` use strict; use warnings; use Future::AsyncAwait; sub foo { warn "[@_]\n" } foo -async; ``` does not work: ``` ❯ perl test.pl Expected async to be followed by sub at test.pl line 7. ``` P.S. I originally found this with Mojolicious https://github.com/mojolicious/mojo/issues/1461
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-6727-1579190305-669.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-6727-1579190305-669.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-23931-1580177330-1828.131493-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: 355
Download (untitled) / with headers
text/plain 355b
Yeah there's not a lot that can be done about that. The way the perl parser plugins work means that the `async` parser doesn't know it has a hyphen in front of it, most annoyingly. As this is for the Mojo stuff I think the proposed solution there is to rename the feature to something like -async_await so this problem wouldn't come up. -- Paul Evans


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.