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
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
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.