Skip to content

Conversation

@fglock
Copy link
Owner

@fglock fglock commented Oct 29, 2025

Summary

FileHandle.pm expects to import IO::Handle::DESTROY, but it wasn't defined.

Changes

  • Added an empty DESTROY method to IO::Handle.pm
  • The actual cleanup happens in Java when the JVM garbage collects the object
  • This DESTROY method just needs to exist so FileHandle can import it

Test Results

t/op/filehandle.t: 4/4 tests now pass (was 0/4)

Details

The error was:

IO::Handle::DESTROY missing at file:/Users/fglock/projects/PerlOnJava/target/perlonjava-3.0.0.jar!/lib/FileHandle.pm line 73

FileHandle.pm line 63-64 explicitly imports DESTROY from IO::Handle, but the method wasn't defined in IO::Handle.pm.

FileHandle.pm expects to import IO::Handle::DESTROY, but it wasn't
defined. Added an empty DESTROY method to satisfy this requirement.
The actual cleanup happens in Java when the JVM garbage collects
the object.

Fixes: t/op/filehandle.t (4/4 tests now pass)
@fglock fglock merged commit 54e3c10 into master Oct 30, 2025
2 checks passed
@fglock fglock deleted the fix/filehandle-t branch October 30, 2025 08:06
@fglock fglock restored the fix/filehandle-t branch October 30, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants