File Coverage

blib/lib/File/Map.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 19 19 100.0


line stmt bran cond sub pod time code
1             package File::Map;
2             $File::Map::VERSION = '0.71';
3             # This software is copyright (c) 2008, 2009, 2010, 2011, 2012 by Leon Timmermans .
4             #
5             # This is free software; you can redistribute it and/or modify it under
6             # the same terms as perl itself.
7              
8 7     7   210292 use 5.008;
  7         65  
9 7     7   36 use strict;
  7         10  
  7         159  
10 7     7   34 use warnings FATAL => 'all';
  7         10  
  7         375  
11              
12 7     7   3443 use Sub::Exporter::Progressive 0.001005 ();
  7         7701  
  7         162  
13 7     7   41 use XSLoader ();
  7         14  
  7         1124  
14              
15             XSLoader::load('File::Map', File::Map->VERSION);
16              
17             my %export_data = (
18             'map' => [qw/map_handle map_file map_anonymous unmap sys_map/],
19             extra => [qw/remap sync pin unpin advise protect/],
20             'lock' => [qw/wait_until notify broadcast lock_map/],
21             constants => [qw/PROT_NONE PROT_READ PROT_WRITE PROT_EXEC MAP_ANONYMOUS MAP_SHARED MAP_PRIVATE MAP_ANON MAP_FILE/]
22             );
23              
24             my (@export_ok, %export_tags);
25              
26             while (my ($category, $functions) = each %export_data) {
27             for my $function (grep { defined &{$_} } @{$functions}) {
28             push @export_ok, $function;
29             push @{ $export_tags{$category} }, $function;
30             }
31             }
32              
33             Sub::Exporter::Progressive->import(-setup => { exports => \@export_ok, groups => \%export_tags });
34              
35             1;
36              
37             #ABSTRACT: Memory mapping made simple and safe.
38              
39             __END__