diff --git a/src/main/java/org/perlonjava/core/Configuration.java b/src/main/java/org/perlonjava/core/Configuration.java index 493011b61..02a71a6c1 100644 --- a/src/main/java/org/perlonjava/core/Configuration.java +++ b/src/main/java/org/perlonjava/core/Configuration.java @@ -33,7 +33,7 @@ public final class Configuration { * Automatically populated by Gradle/Maven during build. * DO NOT EDIT MANUALLY - this value is replaced at build time. */ - public static final String gitCommitId = "121ffb20f"; + public static final String gitCommitId = "c6eb7bdc7"; /** * Git commit date of the build (ISO format: YYYY-MM-DD). @@ -48,7 +48,7 @@ public final class Configuration { * Parsed by App::perlbrew and other tools via: perl -V | grep "Compiled at" * DO NOT EDIT MANUALLY - this value is replaced at build time. */ - public static final String buildTimestamp = "Apr 29 2026 20:58:13"; + public static final String buildTimestamp = "Apr 29 2026 22:10:32"; // Prevent instantiation private Configuration() { diff --git a/src/main/java/org/perlonjava/runtime/runtimetypes/ErrnoVariable.java b/src/main/java/org/perlonjava/runtime/runtimetypes/ErrnoVariable.java index 82e5aef01..c0dd7be7b 100644 --- a/src/main/java/org/perlonjava/runtime/runtimetypes/ErrnoVariable.java +++ b/src/main/java/org/perlonjava/runtime/runtimetypes/ErrnoVariable.java @@ -228,13 +228,15 @@ public RuntimeScalar set(String value) { int num = Integer.parseInt(value.trim()); return set(num); } catch (NumberFormatException e) { - // Not a number and not a known message - store as message with errno 0 - // Always maintain INTEGER type so numeric operations use the fast path - // and never trigger "isn't numeric" warnings via NumberParser.parseNumber() + // Not a number and not a known message - store as message with errno 0. + // Use DUALVAR so the string portion is preserved when $! is read or + // copied (e.g. `my $str = $!`). The numeric side of the dualvar is 0 + // (a plain INTEGER scalar) so numeric ops don't go through + // NumberParser.parseNumber() and won't emit "isn't numeric" warnings. this.errno = 0; this.message = value; - this.type = RuntimeScalarType.INTEGER; - this.value = 0; + this.type = RuntimeScalarType.DUALVAR; + this.value = new DualVar(new RuntimeScalar(0), new RuntimeScalar(value)); return this; } }