Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the XSLoader CPAN distribution.

Report information
The Basics
Id: 43344
Status: rejected
Priority: 0/
Queue: XSLoader

People
Owner: Nobody in particular
Requestors: gfuji [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Why XSLoader does not treat dl_load_flags()?
Hello, There are some cases where I want to use dl_load_flags(), but XSLoader seems not to treat dl_load_flags() currently. The attached file, enable_dl_load_flags.patch, enables XSLoader to treat dl_load_flags() as Dynaloader does. Please consider it. Regards, -- Goro Fuji (gfx) GFUJI at CPAN.org
Subject: enable_dl_load_flags.patch
*** XSLoader_pm.PL.orig Tue Feb 17 11:37:26 2009 --- XSLoader_pm.PL Tue Feb 17 11:39:35 2009 *************** *** 106,111 **** --- 106,112 ---- } print OUT <<'EOT'; + my $flags = $module->can('dl_load_flags') ? $module->dl_load_flags : 0x00; # Many dynamic extension loading problems will appear to come from # this section of code: XYZ failed at line 123 of DynaLoader.pm. # Often these errors are actually occurring in the initialisation *************** *** 113,119 **** # in this perl code simply because this was the last perl code # it executed. ! my $libref = dl_load_file($file, 0) or do { require Carp; Carp::croak("Can't load '$file' for module $module: " . dl_error()); }; --- 114,120 ---- # in this perl code simply because this was the last perl code # it executed. ! my $libref = dl_load_file($file, $flags) or do { require Carp; Carp::croak("Can't load '$file' for module $module: " . dl_error()); };
GFUJI wrote via RT: Show quoted text
> Hello,
Hello, First, sorry for not answering earlier, but some some unknown reason, I never received the mail from RT (but I take my share of shame for not checking & handling my tickets more regularly). Show quoted text
> There are some cases where I want to use dl_load_flags(), but XSLoader > seems not to treat dl_load_flags() currently.
Indeed, but it is by design. As stated in the documentation: Many (most) features of DynaLoader are not implemented in XSLoader, like for example the dl_load_flags, not honored by XSLoader. The aim of XSLoader is to be extremely simple and fast. For anything more complex, use DynaLoader. Note that I personally have no strong opinion, so feel free to discuss this on P5P, which is the true place where this module is developped. -- Close the world, txEn eht nepO.