develooper Front page | perl.perl5.porters | Postings from May 2004

XSLoader and dl_shared_objects

Thread Next
Rafael Garcia-Suarez
May 11, 2004 02:59
XSLoader and dl_shared_objects
Message ID:
Currently XSLoader (unlike DynaLoader) doesn't populate the array
@DynaLoader::dl_shared_objects with the paths of the .so files it has
loaded. This may be annoying in some cases (and notably things may break
when a module is ported from DynaLoader to XSLoader). So I suggest the
following patch to XSLoader:

Index: ext/DynaLoader/XSLoader_pm.PL
--- ext/DynaLoader/XSLoader_pm.PL	(revision 3506)
+++ ext/DynaLoader/XSLoader_pm.PL	(working copy)
@@ -115,6 +115,7 @@
     my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file);
     # See comment block above
+    push(@DynaLoader::dl_shared_objects, $file); # record files loaded
     return &$xs(@_);
End of patch.

Another approach would be to add the $files to @XSLoader::dl_shared_objects.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About