File Coverage

blib/lib/Win32/Shortcut/Readlink.pm
Criterion Covered Total %
statement 11 13 84.6
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 19 84.2


line stmt bran cond sub pod time code
1             package Win32::Shortcut::Readlink;
2              
3             require 5.008000;
4 2     2   278550 use strict;
  2         4  
  2         46  
5 2     2   8 use warnings;
  2         4  
  2         44  
6 2     2   9 use base qw( Exporter );
  2         2  
  2         278  
7              
8             BEGIN {
9              
10             # ABSTRACT: Make readlink work with shortcuts
11 2     2   8 our $VERSION = '0.03'; # VERSION
12              
13 2 50       173 if($^O =~ /^(cygwin|MSWin32)$/)
14             {
15 0           require XSLoader;
16 0           XSLoader::load('Win32::Shortcut::Readlink', $Win32::Shortcut::Readlink::VERSION);
17             }
18              
19             }
20              
21              
22             our @EXPORT_OK = qw( readlink );
23             our @EXPORT = @EXPORT_OK;
24              
25              
26             if(eval { require 5.010000 })
27             {
28             require Win32::Shortcut::Readlink::Perl510;
29             }
30             elsif(eval { require 5.008000 })
31             {
32             require Win32::Shortcut::Readlink::Perl58;
33             }
34             else
35             {
36             # TODO: doesn't currently work. Figure out
37             # if this is a limitation of Perl 5.6 or if
38             # I am just doing it wrong. Fix or remove
39             # if appropriate. BTW- dist requires 5.8
40             # so shouldn't even get in here if installed
41             # without hacking.
42             require Win32::Shortcut::Readlink::Perl56;
43             }
44              
45             1;
46              
47             __END__