Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public static RuntimeList executePerlCode(CompilerOptions compilerOptions,
);

if (!globalInitialized) {
GlobalContext.initializeGlobals(compilerOptions);
globalInitialized = true;
GlobalContext.initializeGlobals(compilerOptions);
}

if (CompilerOptions.DEBUG_ENABLED) ctx.logDebug("parse code: " + compilerOptions.code);
Expand Down Expand Up @@ -306,8 +306,8 @@ public static RuntimeList executePerlAST(Node ast,
);

if (!globalInitialized) {
GlobalContext.initializeGlobals(compilerOptions);
globalInitialized = true;
GlobalContext.initializeGlobals(compilerOptions);
}

if (CompilerOptions.DEBUG_ENABLED) ctx.logDebug("Using provided AST");
Expand Down Expand Up @@ -600,8 +600,8 @@ public static Object compilePerlCode(CompilerOptions compilerOptions) throws Exc
);

if (!globalInitialized) {
GlobalContext.initializeGlobals(compilerOptions);
globalInitialized = true;
GlobalContext.initializeGlobals(compilerOptions);
}

// Tokenize
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/perlonjava/core/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "c92620f4d";
public static final String gitCommitId = "4b2bcf8dd";

/**
* Git commit date of the build (ISO format: YYYY-MM-DD).
Expand All @@ -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 20 2026 15:59:13";
public static final String buildTimestamp = "Apr 20 2026 16:15:32";

// Prevent instantiation
private Configuration() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ public static void initializeGlobals(CompilerOptions compilerOptions) {
}
inc.add(new RuntimeScalar(JAR_PERLLIB)); // internal src/main/perl/lib (lowest priority)

// Honor PERL_USE_UNSAFE_INC=1 (required by CPAN.pm / Module::Install-based
// Makefile.PL scripts that expect `.` in @INC). Perl 5.26 removed `.` from
// @INC by default, but CPAN tooling sets PERL_USE_UNSAFE_INC=1 to restore it.
String unsafeInc = env.getOrDefault("PERL_USE_UNSAFE_INC", new RuntimeScalar("")).toString();
if (!unsafeInc.isEmpty() && !unsafeInc.equals("0")) {
inc.add(new RuntimeScalar("."));
}

// Initialize %INC
GlobalVariable.getGlobalHash("main::INC");

Expand Down
Loading