File Coverage

blib/lib/File/Raw.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 15 15 100.0


line stmt bran cond sub pod time code
1             package File::Raw;
2              
3 18     18   2878016 use strict;
  18         26  
  18         541  
4 18     18   65 use warnings;
  18         37  
  18         1091  
5              
6             our $VERSION = '0.08';
7              
8             # Use DynaLoader with RTLD_GLOBAL so C API symbols (file_hooks.h) are visible
9             # to other XS modules that link against us at runtime.
10             # XSLoader on older Perls (5.10) doesn't honour dl_load_flags.
11 18     18   88 use DynaLoader;
  18         60  
  18         1355  
12             our @ISA = ('DynaLoader');
13             # Returns 0x01 (RTLD_GLOBAL) to DynaLoader::bootstrap, causing dlopen()
14             # to load Raw.so into the global symbol table. Without this, symbols
15             # default to RTLD_LOCAL and are invisible to subsequently loaded XS
16             # modules that depend on our C API (e.g. test files for file_set_read_hook).
17 18     18 1 18247 sub dl_load_flags { 0x01 }
18             __PACKAGE__->bootstrap($VERSION);
19              
20             1;
21              
22             __END__