File Coverage

blib/lib/overload/open.pm
Criterion Covered Total %
statement 15 17 88.2
branch n/a
condition n/a
subroutine 6 7 85.7
pod 3 3 100.0
total 24 27 88.8


line stmt bran cond sub pod time code
1             package overload::open;
2 5     5   273847 use strict;
  5         36  
  5         119  
3 5     5   23 use warnings;
  5         6  
  5         93  
4 5     5   71 use 5.004_000;
  5         15  
5 5     5   38 use XSLoader;
  5         7  
  5         867  
6             our $VERSION = '1.9.6';
7             our $GLOBAL_OPEN;
8             our $GLOBAL_SYSOPEN;
9             our $SUPPRESS_WARNINGS;
10             require overload::open;
11              
12             sub prehook_open {
13 4     4 1 7966 my ( undef, $callback ) = @_;
14 4         1361 $GLOBAL_OPEN = $callback;
15             }
16              
17             sub prehook_sysopen {
18 2     2 1 10 my ( undef, $callback ) = @_;
19 2         1576 $GLOBAL_SYSOPEN = $callback;
20             }
21             sub suppress_warnings {
22 0     0 1   my ( undef, $value ) = @_;
23 0           $SUPPRESS_WARNINGS = $value;
24             }
25             sub _install_open; # Provided by open.xs
26             sub _install_sysopen; # Provided by open.xs
27              
28             XSLoader::load( 'overload::open', $VERSION );
29             _install_open();
30             _install_sysopen();
31              
32             q[Open sesame seed.];
33              
34             __END__