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