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
|
|
50996
|
use strict; |
|
60
|
|
|
|
|
122
|
|
|
60
|
|
|
|
|
1962
|
|
20
|
60
|
|
|
60
|
|
332
|
use DynaLoader; |
|
60
|
|
|
|
|
112
|
|
|
60
|
|
|
|
|
1590
|
|
21
|
60
|
|
|
60
|
|
304
|
use Carp; |
|
60
|
|
|
|
|
99
|
|
|
60
|
|
|
|
|
3842
|
|
22
|
60
|
|
|
60
|
|
345
|
use vars qw( @ISA $VERSION $AUTOLOAD ); |
|
60
|
|
|
|
|
116
|
|
|
60
|
|
|
|
|
21908
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
@ISA = qw(DynaLoader); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$VERSION = '0.83'; |
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
|
|
2245793
|
my $self = shift; |
36
|
6227
|
|
|
|
|
9656
|
my $opt = $AUTOLOAD; |
37
|
6227
|
50
|
|
|
|
15381
|
ref $self or croak "$self is not an object"; |
38
|
6227
|
|
|
|
|
31384
|
$opt =~ s/.*://; |
39
|
6227
|
100
|
|
|
|
20241
|
$opt =~ /^[A-Z]/ or croak "Invalid method $opt called"; |
40
|
6226
|
100
|
|
|
|
14049
|
@_ <= 1 or croak "$opt cannot take more than one argument"; |
41
|
6225
|
100
|
100
|
|
|
13045
|
unless (@_ or defined wantarray) { |
42
|
21
|
|
|
|
|
1492
|
carp "Useless use of $opt in void context"; |
43
|
21
|
|
|
|
|
761
|
return; |
44
|
|
|
|
|
|
|
} |
45
|
6204
|
|
|
|
|
8391
|
my @warn; |
46
|
|
|
|
|
|
|
{ |
47
|
6204
|
|
|
4
|
|
8039
|
local $SIG{__WARN__} = sub { push @warn, $_[0] }; |
|
6204
|
|
|
|
|
35842
|
|
|
4
|
|
|
|
|
36
|
|
48
|
6204
|
|
|
|
|
11425
|
$opt = eval { $self->configure( $opt, @_ ) }; |
|
6204
|
|
|
|
|
52587
|
|
49
|
|
|
|
|
|
|
} |
50
|
6204
|
|
|
|
|
14703
|
for my $w (@warn) { |
51
|
4
|
|
|
|
|
37
|
$w =~ s/\s+at.*?C\.pm.*//s; |
52
|
4
|
|
|
|
|
493
|
carp $w; |
53
|
|
|
|
|
|
|
} |
54
|
6204
|
100
|
|
|
|
11709
|
if ($@) { |
55
|
210
|
|
|
|
|
1240
|
$@ =~ s/\s+at.*?C\.pm.*//s; |
56
|
210
|
|
|
|
|
16304
|
croak $@; |
57
|
|
|
|
|
|
|
} |
58
|
5994
|
|
|
|
|
13818
|
$opt; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |