line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FFI::Platypus::Legacy; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
54
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
42
|
|
5
|
2
|
|
|
2
|
|
29
|
use 5.008004; |
|
2
|
|
|
|
|
5
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Legacy Platypus interfaces |
8
|
|
|
|
|
|
|
our $VERSION = '2.07'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package FFI::Platypus; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _package |
14
|
|
|
|
|
|
|
{ |
15
|
2
|
|
|
2
|
|
4
|
my($self, $module, $modlibname) = @_; |
16
|
|
|
|
|
|
|
|
17
|
2
|
50
|
|
|
|
12
|
($module, $modlibname) = caller unless defined $modlibname; |
18
|
2
|
|
|
|
|
6
|
my @modparts = split /::/, $module; |
19
|
2
|
|
|
|
|
4
|
my $modfname = $modparts[-1]; |
20
|
2
|
|
|
|
|
6
|
my $modpname = join('/',@modparts); |
21
|
2
|
|
|
|
|
3
|
my $c = @modparts; |
22
|
2
|
|
|
|
|
16
|
$modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
{ |
25
|
2
|
|
|
|
|
3
|
my @maybe = ( |
|
2
|
|
|
|
|
8
|
|
26
|
|
|
|
|
|
|
"$modlibname/auto/$modpname/$modfname.txt", |
27
|
|
|
|
|
|
|
"$modlibname/../arch/auto/$modpname/$modfname.txt", |
28
|
|
|
|
|
|
|
); |
29
|
2
|
|
|
|
|
5
|
foreach my $file (@maybe) |
30
|
|
|
|
|
|
|
{ |
31
|
4
|
50
|
|
|
|
75
|
if(-f $file) |
32
|
|
|
|
|
|
|
{ |
33
|
0
|
|
|
|
|
0
|
open my $fh, '<', $file; |
34
|
0
|
|
|
|
|
0
|
my $line = <$fh>; |
35
|
0
|
|
|
|
|
0
|
close $fh; |
36
|
0
|
0
|
|
|
|
0
|
if($line =~ /^FFI::Build\@(.*)$/) |
37
|
|
|
|
|
|
|
{ |
38
|
0
|
|
|
|
|
0
|
$self->lib("$modlibname/$1"); |
39
|
0
|
|
|
|
|
0
|
return $self; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
2
|
|
|
|
|
14
|
require FFI::Platypus::ShareConfig; |
46
|
2
|
|
|
|
|
4
|
my @dlext = @{ FFI::Platypus::ShareConfig->get("config_dlext") }; |
|
2
|
|
|
|
|
8
|
|
47
|
|
|
|
|
|
|
|
48
|
2
|
|
|
|
|
8
|
foreach my $dlext (@dlext) |
49
|
|
|
|
|
|
|
{ |
50
|
2
|
|
|
|
|
7
|
my $file = "$modlibname/auto/$modpname/$modfname.$dlext"; |
51
|
2
|
50
|
|
|
|
22
|
unless(-e $file) |
52
|
|
|
|
|
|
|
{ |
53
|
2
|
|
|
|
|
5
|
$modlibname =~ s,[\\/][^\\/]+$,,; |
54
|
2
|
|
|
|
|
6
|
$file = "$modlibname/arch/auto/$modpname/$modfname.$dlext"; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
2
|
50
|
|
|
|
25
|
if(-e $file) |
58
|
|
|
|
|
|
|
{ |
59
|
0
|
|
|
|
|
0
|
$self->lib($file); |
60
|
0
|
|
|
|
|
0
|
return $self; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
2
|
|
|
|
|
10
|
$self; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
__END__ |