Fix tr.t and multideref.t: Unicode support + strict-refs #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes both
t/op/tr.tandt/op/multideref.twithout breaking other tests.Test Results
Baseline → After Fix:
tr.t: 256/318 → 277/318 (+21 tests) ✅multideref.t: 2/65 → 56/65 (+54 tests) ✅avhv.t: 9/40 → 40/40 (+31 tests) ✅magic.t: 103 → 103 (no regression) ✅Total improvement: +106 passing tests, 0 regressions!
Commits
1. tr/// operator improvements (commit 1)
\N{name}syntax with ICU4J integration (~30,000+ names)$s =~ tr/\N{LATIN SMALL LETTER E WITH ACUTE}/E/;isSupplementaryCodePoint()instead ofisHighSurrogate()\N{}validation: Proper "Unknown charname" error2. Strict-refs support for hash/array dereferences (commit 2)
Dereference.java*NonStrictmethods inRuntimeScalarandRuntimeBaseProxyhashDerefNonStrict/arrayDerefNonStrict:no strict 'refs'%\$varin scalar context to prevent VerifyErrorTechnical Details
The strict-refs fix correctly distinguishes between:
$foo = "bar"; $foo->{key}→ looks up%bar$arr = []; $arr->{key}→ "Not a HASH reference"This matches Perl's behavior and satisfies the Java bytecode verifier.