Fix interpreter strict/pragma handling and debugger improvements#288
Merged
Fix interpreter strict/pragma handling and debugger improvements#288
Conversation
- Add PERL5DB environment variable support
- Execute PERL5DB code to define custom DB::DB
- Call user DB::DB instead of interactive debugger when defined
- Fix %ENV inheritance in child processes
- Copy Perl %ENV hash to ProcessBuilder environment
- Ensures local $ENV{...} changes propagate to backticks/system()
- Silence JVM VerifyError fallback message
- Make message conditional on SHOW_FALLBACK flag
Test impact:
- op/debug.t: Tests 1-2 now pass
- run/switchd.t: Requires -d:Module syntax (not implemented)
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <noreply@cognition.ai>
The interpreter backend was not applying strict/warnings/features from
pragmas like 'use strict' inside eval strings. This happened because
CompilerFlagNode was marked with compileTimeOnly=true, and BytecodeCompiler
was skipping all such nodes.
Unlike the JVM emitter which visits CompilerFlagNode to set flags on the
symbol table, BytecodeCompiler was completely ignoring it. This fix adds
special handling to visit CompilerFlagNode before the compileTimeOnly check,
allowing pragmas to properly affect the compilation of subsequent statements.
Test case: eval q{ use strict; $x } - now correctly reports:
"Global symbol "\$x" requires explicit package name"
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <noreply@cognition.ai>
The isNonAsciiLengthOneScalarAllowedUnderNoUtf8 function was incorrectly allowing all non-ASCII characters (c > 127) as special variables under 'no utf8'. This should only apply to Latin-1 extended characters (128-255). Unicode characters above 255 (like Greek α = 945) should be treated as normal identifiers and blocked under strict vars. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Add debugger bullet point to intro slides "What You Get" section - Add full debugger slide with command reference to technical slides - Update roadmap to reflect debugger is now stable Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
Use POSIX isatty() to detect non-interactive stdin and throw an error immediately instead of blocking forever waiting for input. This prevents test hangs when -d flag is used in non-interactive contexts. 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
Fixes and improvements after #287:
use strictand other pragmas work correctly in eval strings when using the interpreter backendTest plan
mvn testpasseseval qq/ use strict; \$\x{3b1} /now correctly throws strict errorGenerated with Devin