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.70';
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   223593 use 5.008;
  7         69  
9 7     7   35 use strict;
  7         24  
  7         188  
10 7     7   37 use warnings FATAL => 'all';
  7         13  
  7         445  
11              
12 7     7   3785 use Sub::Exporter::Progressive 0.001005 ();
  7         8038  
  7         163  
13 7     7   53 use XSLoader ();
  7         35  
  7         1140  
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__