Skip Menu |
Report information
Id: 131243
Status: rejected
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: regex
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [REGEX] Interpolating a Hash in a regex treats it as a list and errors out
Download (untitled) / with headers
text/plain 452b
Both of these forms produce the error below my %stuff = <fo ba me ow>; say 'foo bar meows' ~~ m:g/ %stuff \S+ /; say 'foo bar meows' ~~ m:g/ %(<fo ba me ow>) \S+ /; # P6opaque: no such attribute '$!reified' in type List when trying to get # a value in block <unit> at z2.p6 line 8 What did I expect to happen? No idea, I just randomly tried the code. If it's not meant to work then at least a better error should be shown.
Download (untitled) / with headers
text/plain 711b
On Tue, 02 May 2017 08:35:34 -0700, cpan@zoffix.com wrote: Show quoted text
> Both of these forms produce the error below > > my %stuff = <fo ba me ow>; > say 'foo bar meows' ~~ m:g/ %stuff \S+ /; > say 'foo bar meows' ~~ m:g/ %(<fo ba me ow>) \S+ /; > > # P6opaque: no such attribute '$!reified' in type List when trying to > get > # a value in block <unit> at z2.p6 line 8 > > What did I expect to happen? No idea, I just randomly tried the code. > If it's not meant to work then at least a better error should be > shown.
S05 says┬╣: The use of a hash variable in patterns is reserved. So yes, this should be made to throw a nicer error. --- [1] http://design.perl6.org/S05.html#Variable_(non-)interpolation
Download (untitled) / with headers
text/plain 109b
This got re-reported on GitHub. Closing in favour of that Issue: https://github.com/rakudo/rakudo/issues/1367


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

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org