Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Sys-Mmap CPAN distribution.

Report information
The Basics
Id: 59748
Status: resolved
Priority: 0/
Queue: Sys-Mmap

People
Owner: TODDR [...] cpan.org
Requestors: TODDR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13
Fixed in: 0.13_01



Subject: use XSLoader if possible for more lightweight load
XSLoader is the new shiny since perl 5.6. It's more light weight to load XS over DynaLoader, which this module currently uses. I suggest attempting to use XSLoader and fail back to DynaLoader if it's not available.
Subject: patch.txt
diff --git a/Mmap.pm b/Mmap.pm index f0f370c..324d921 100644 --- a/Mmap.pm +++ b/Mmap.pm @@ -180,10 +180,9 @@ compliant and contributed documentation as well. =cut use strict; -use vars qw($VERSION @ISA @EXPORT $AUTOLOAD); -require DynaLoader; +our ($VERSION, @ISA, @EXPORT, $AUTOLOAD); require Exporter; -@ISA = qw(Exporter DynaLoader); +@ISA = qw(Exporter); @EXPORT = qw(mmap munmap MAP_ANON MAP_ANONYMOUS MAP_FILE MAP_PRIVATE MAP_SHARED @@ -289,8 +288,16 @@ sub AUTOLOAD { goto &$AUTOLOAD; } -bootstrap Sys::Mmap $VERSION; +eval { + require XSLoader; + XSLoader::load( 'Sys::Mmap', $VERSION ); +} or do { + require DynaLoader; + push @ISA, 'DynaLoader'; + bootstrap Sys::Mmap $VERSION; +}; 1; __END__ +
This has been resolved in 0.13_01