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
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 = "7f674c424";
public static final String gitCommitId = "63c473e40";

/**
* 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 12 2026 19:31:33";
public static final String buildTimestamp = "Apr 12 2026 20:39:23";

// Prevent instantiation
private Configuration() {
Expand Down
15 changes: 10 additions & 5 deletions src/main/java/org/perlonjava/runtime/perlmodule/DynaLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ public static RuntimeList bootstrap(RuntimeArray args, int ctx) {
).getList();
}

String module = args.getFirst().toString();
return WarnDie.die(
new RuntimeScalar("Can't load module " + module),
new RuntimeScalar("\n")
).getList();
// Delegate to XSLoader::load() which has a multi-stage fallback:
// 1. Java XS class found → initialize and return true
// 2. @ISA has functional parent → return true (inheritance fallback)
// 3. ::PP companion loaded → return true
// 4. die with "Can't load loadable object..." (matches /loadable object/
// pattern that CPAN modules use to detect XS failure and fall back)
//
// This makes DynaLoader-based modules (Image::Magick, Tk, etc.)
// behave the same as XSLoader-based modules in PerlOnJava.
return XSLoader.load(args, ctx);
}

public static RuntimeList boot_DynaLoader(RuntimeArray args, int ctx) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/perl/lib/DynaLoader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ BEGIN {
*bootstrap = sub {
my ($module) = @_;
$module = caller() unless defined $module;
die "Can't load module $module\n";
# Delegate to XSLoader::load for its multi-stage fallback
require XSLoader;
return XSLoader::load($module);
};
}

Expand Down
Loading