line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
################################################################################ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# MODULE: Convert::Binary::C |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
################################################################################ |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# DESCRIPTION: Convert::Binary::C Perl extension module |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
################################################################################ |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# Copyright (c) 2002-2020 Marcus Holland-Moritz. All rights reserved. |
12
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify |
13
|
|
|
|
|
|
|
# it under the same terms as Perl itself. |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
################################################################################ |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
package Convert::Binary::C; |
18
|
|
|
|
|
|
|
|
19
|
60
|
|
|
60
|
|
54862
|
use strict; |
|
60
|
|
|
|
|
138
|
|
|
60
|
|
|
|
|
2487
|
|
20
|
60
|
|
|
60
|
|
355
|
use DynaLoader; |
|
60
|
|
|
|
|
110
|
|
|
60
|
|
|
|
|
1744
|
|
21
|
60
|
|
|
60
|
|
337
|
use Carp; |
|
60
|
|
|
|
|
115
|
|
|
60
|
|
|
|
|
3972
|
|
22
|
60
|
|
|
60
|
|
379
|
use vars qw( @ISA $VERSION $AUTOLOAD ); |
|
60
|
|
|
|
|
133
|
|
|
60
|
|
|
|
|
24290
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
@ISA = qw(DynaLoader); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$VERSION = '0.84'; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
bootstrap Convert::Binary::C $VERSION; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# Unfortunately, XS AUTOLOAD isn't supported |
31
|
|
|
|
|
|
|
# by stable perl distributions before 5.8.0. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub AUTOLOAD |
34
|
|
|
|
|
|
|
{ |
35
|
6227
|
|
|
6227
|
|
2232275
|
my $self = shift; |
36
|
6227
|
|
|
|
|
9871
|
my $opt = $AUTOLOAD; |
37
|
6227
|
50
|
|
|
|
15085
|
ref $self or croak "$self is not an object"; |
38
|
6227
|
|
|
|
|
30522
|
$opt =~ s/.*://; |
39
|
6227
|
100
|
|
|
|
20554
|
$opt =~ /^[A-Z]/ or croak "Invalid method $opt called"; |
40
|
6226
|
100
|
|
|
|
13027
|
@_ <= 1 or croak "$opt cannot take more than one argument"; |
41
|
6225
|
100
|
100
|
|
|
12894
|
unless (@_ or defined wantarray) { |
42
|
21
|
|
|
|
|
1683
|
carp "Useless use of $opt in void context"; |
43
|
21
|
|
|
|
|
637
|
return; |
44
|
|
|
|
|
|
|
} |
45
|
6204
|
|
|
|
|
8780
|
my @warn; |
46
|
|
|
|
|
|
|
{ |
47
|
6204
|
|
|
4
|
|
7683
|
local $SIG{__WARN__} = sub { push @warn, $_[0] }; |
|
6204
|
|
|
|
|
35214
|
|
|
4
|
|
|
|
|
37
|
|
48
|
6204
|
|
|
|
|
12427
|
$opt = eval { $self->configure( $opt, @_ ) }; |
|
6204
|
|
|
|
|
52130
|
|
49
|
|
|
|
|
|
|
} |
50
|
6204
|
|
|
|
|
14980
|
for my $w (@warn) { |
51
|
4
|
|
|
|
|
41
|
$w =~ s/\s+at.*?C\.pm.*//s; |
52
|
4
|
|
|
|
|
496
|
carp $w; |
53
|
|
|
|
|
|
|
} |
54
|
6204
|
100
|
|
|
|
11434
|
if ($@) { |
55
|
210
|
|
|
|
|
1405
|
$@ =~ s/\s+at.*?C\.pm.*//s; |
56
|
210
|
|
|
|
|
17389
|
croak $@; |
57
|
|
|
|
|
|
|
} |
58
|
5994
|
|
|
|
|
13838
|
$opt; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |