Fix bytecode compiler, list slices, Time::Local, and stat/filehandles#247
Merged
Fix bytecode compiler, list slices, Time::Local, and stat/filehandles#247
Conversation
The handleArrowArrayDeref method had an overly restrictive check that only treated a single range index (0..2) as a slice when the left side was a "true array literal" with multiple literal elements. This caused (func())[0..2] and similar expressions to evaluate the range in scalar context (flip-flop) instead of list context (range expansion). Simplified the condition: any single range operator in the index now always uses the slice path, regardless of what the left side is. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Time.java: Use getDouble()+Math.floor() instead of getInt() for epoch values in localtime/gmtime, fixing truncation for values > 2^31 - Time.java: Fix DayOfWeek conversion (Java Mon=1..Sun=7 to Perl Sun=0..Sat=6) - Update Time::Local.pm from 1.30 to 1.35 (upstream CPAN) - Add Time-Local test import to config.yaml All 9 Time::Local test subtests now pass. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
Was using Java DateTimeFormatter.RFC_1123_DATE_TIME which produces Fri, 27 Feb 2026 10:00:43 +0100. Now produces the correct Perl asctime format: Fri Feb 27 10:00:43 2026. op/time.t: 21 to 71 of 72 passing (only ENV TZ test remains). Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
myvariable extraction in short-circuit operators (&&,||,//) and AUTOLOAD with forward declarationsstat _/lstat _to use cached stat buffer, fix stat on filehandles andstat _parsingBytecodeCompiler.compile()was overwriting eval STRING package context (155 test regression from commit0c15135e)(func())[0..2]now correctly expands the range instead of evaluating..as flip-flop in scalar contextgetDouble()+Math.floor()instead ofgetInt()which truncated values > 2^31Test plan
./gradlew test— all 154 unit tests passsignatures.t— regression fixedLocal.t— all 9 subtests pass (was 6/9)(func())[0..2],("a","b","c")[0..2],(func())[1,3]all work correctlyGenerated with Devin