Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 114511
Status: resolved
Priority: 0/
Queue: Moo

People
Owner: Nobody in particular
Requestors: ribasushi [...] leporine.io
Cc:
AdminCc:

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



Subject: Insufficient testing for %^H population
If I apply the attached patch, tests still fully pass :/ I was digging in this direction wondering if I can omit the entire shebang if ! keys %$hinthash. Not submitting that (trivial) work, as the test deficiency needs to be resolved first.
Subject: sq_nohint.patch
diff --git a/lib/Sub/Quote.pm b/lib/Sub/Quote.pm index 7036c70..7224baf 100644 --- a/lib/Sub/Quote.pm +++ b/lib/Sub/Quote.pm @@ -110,11 +110,6 @@ sub quote_sub { ."BEGIN {\n" ." \$^H = ".quotify($hints).";\n" ." \${^WARNING_BITS} = ".quotify($bitmask).";\n" - ." \%^H = (\n" - . join('', map - " ".quotify($_)." => ".quotify($hintshash->{$_}).",", - keys %$hintshash) - ." );\n" ."}\n" ."# END quote_sub PRELUDE\n"; $code = "$context$code";
I've added partial testing for this in git. There are some issues with this though. First is that we can't preserve the hints from context at all on perl 5.8. That can probably just be a documented caveat. Second is that it doesn't work with hints that are references, either from context or passed in as an option. I can fix it when an option is passed, but taking reference options from context probably can't work. I'm not sure what I want to do about that yet.
I'm going to make some improvements in terms of handling hints, but this direct issue is fixed in 2.002_001.
Fixed in 2.002002.