use DynaLoader::mod2fname if available
mod2fname isn't exactly well documented, but basically, some
platforms have some unusual requirements for their library
names, so instead of, say, Utils.so for List::Utils, you
might end up with PL_List__Utils.so; what mod2fname does is
get you that library name.
There's currently two systems with mod2fname defined, VMS
and Android. OS/2 uses it as well, but the OS/2 port isn't
functional at the moment. Additionally, Windows may start
using it in the near future.
Brian Fraser authored 9 years ago
Brian Manning committed 9 years ago
319 | 319 | my @found_libs = (); |
320 | 320 | foreach my $name (keys %{ $self->{deps} }) { |
321 | 321 | (my $stem = $name) =~ s/^.*:://; |
322 | if ( defined &DynaLoader::mod2fname ) { | |
323 | my @parts = split /::/, $name; | |
324 | $stem = DynaLoader::mod2fname([@parts]); | |
325 | } | |
322 | 326 | my $lib = $mapper->($stem); |
323 | 327 | my $pattern = qr/$lib$/; |
324 | 328 |