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
|
|
53993
|
use strict; |
|
60
|
|
|
|
|
133
|
|
|
60
|
|
|
|
|
1807
|
|
20
|
60
|
|
|
60
|
|
294
|
use DynaLoader; |
|
60
|
|
|
|
|
106
|
|
|
60
|
|
|
|
|
2042
|
|
21
|
60
|
|
|
60
|
|
351
|
use Carp; |
|
60
|
|
|
|
|
101
|
|
|
60
|
|
|
|
|
3856
|
|
22
|
60
|
|
|
60
|
|
340
|
use vars qw( @ISA $VERSION $AUTOLOAD ); |
|
60
|
|
|
|
|
109
|
|
|
60
|
|
|
|
|
22563
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
@ISA = qw(DynaLoader); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$VERSION = '0.82'; |
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
|
|
2302652
|
my $self = shift; |
36
|
6227
|
|
|
|
|
10201
|
my $opt = $AUTOLOAD; |
37
|
6227
|
50
|
|
|
|
14203
|
ref $self or croak "$self is not an object"; |
38
|
6227
|
|
|
|
|
31522
|
$opt =~ s/.*://; |
39
|
6227
|
100
|
|
|
|
21181
|
$opt =~ /^[A-Z]/ or croak "Invalid method $opt called"; |
40
|
6226
|
100
|
|
|
|
13914
|
@_ <= 1 or croak "$opt cannot take more than one argument"; |
41
|
6225
|
100
|
100
|
|
|
13743
|
unless (@_ or defined wantarray) { |
42
|
21
|
|
|
|
|
1397
|
carp "Useless use of $opt in void context"; |
43
|
21
|
|
|
|
|
536
|
return; |
44
|
|
|
|
|
|
|
} |
45
|
6204
|
|
|
|
|
9129
|
my @warn; |
46
|
|
|
|
|
|
|
{ |
47
|
6204
|
|
|
4
|
|
8189
|
local $SIG{__WARN__} = sub { push @warn, $_[0] }; |
|
6204
|
|
|
|
|
38980
|
|
|
4
|
|
|
|
|
30
|
|
48
|
6204
|
|
|
|
|
12926
|
$opt = eval { $self->configure( $opt, @_ ) }; |
|
6204
|
|
|
|
|
52281
|
|
49
|
|
|
|
|
|
|
} |
50
|
6204
|
|
|
|
|
14761
|
for my $w (@warn) { |
51
|
4
|
|
|
|
|
33
|
$w =~ s/\s+at.*?C\.pm.*//s; |
52
|
4
|
|
|
|
|
417
|
carp $w; |
53
|
|
|
|
|
|
|
} |
54
|
6204
|
100
|
|
|
|
11463
|
if ($@) { |
55
|
210
|
|
|
|
|
1181
|
$@ =~ s/\s+at.*?C\.pm.*//s; |
56
|
210
|
|
|
|
|
14821
|
croak $@; |
57
|
|
|
|
|
|
|
} |
58
|
5994
|
|
|
|
|
13263
|
$opt; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |