| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Feersum; |
|
2
|
24
|
|
|
24
|
|
3764635
|
use 5.008007; |
|
|
24
|
|
|
|
|
110
|
|
|
3
|
24
|
|
|
24
|
|
155
|
use strict; |
|
|
24
|
|
|
|
|
42
|
|
|
|
24
|
|
|
|
|
737
|
|
|
4
|
24
|
|
|
24
|
|
131
|
use warnings; |
|
|
24
|
|
|
|
|
57
|
|
|
|
24
|
|
|
|
|
1407
|
|
|
5
|
24
|
|
|
24
|
|
12488
|
use EV (); |
|
|
24
|
|
|
|
|
55339
|
|
|
|
24
|
|
|
|
|
708
|
|
|
6
|
24
|
|
|
24
|
|
199
|
use Carp (); |
|
|
24
|
|
|
|
|
41
|
|
|
|
24
|
|
|
|
|
2146
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.505'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require Feersum::Connection; |
|
11
|
|
|
|
|
|
|
require Feersum::Connection::Handle; |
|
12
|
|
|
|
|
|
|
require XSLoader; |
|
13
|
|
|
|
|
|
|
XSLoader::load('Feersum', $VERSION); |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# numify as per |
|
16
|
|
|
|
|
|
|
# http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/ |
|
17
|
|
|
|
|
|
|
$VERSION = eval $VERSION; ## no critic (StringyEval, ConstantVersion) |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $INSTANCE; |
|
20
|
|
|
|
|
|
|
|
|
21
|
24
|
|
|
24
|
|
136
|
use Exporter 'import'; |
|
|
24
|
|
|
|
|
44
|
|
|
|
24
|
|
|
|
|
7901
|
|
|
22
|
|
|
|
|
|
|
our @EXPORT_OK = qw(HEADER_NORM_UPCASE HEADER_NORM_LOCASE HEADER_NORM_LOCASE_DASH); |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new { |
|
25
|
23
|
50
|
|
23
|
1
|
3937788
|
unless ($INSTANCE) { |
|
26
|
23
|
|
|
|
|
89
|
$INSTANCE = bless {}, __PACKAGE__; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
23
|
|
|
|
|
410
|
$SIG{PIPE} = 'IGNORE'; |
|
29
|
23
|
|
|
|
|
77
|
return $INSTANCE; |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
*endjinn = *new; |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub use_socket { |
|
34
|
23
|
|
|
23
|
1
|
6626
|
my ($self, $sock) = @_; |
|
35
|
23
|
|
|
|
|
184
|
$self->{socket} = $sock; |
|
36
|
23
|
|
|
|
|
75
|
my $fd = fileno $sock; |
|
37
|
23
|
|
|
|
|
1044
|
$self->accept_on_fd($fd); |
|
38
|
|
|
|
|
|
|
|
|
39
|
23
|
|
50
|
|
|
219
|
my $host = eval { $sock->sockhost() } || 'localhost'; |
|
40
|
23
|
|
50
|
|
|
1786
|
my $port = eval { $sock->sockport() } || 80; ## no critic (MagicNumbers) |
|
41
|
23
|
|
|
|
|
1342
|
$self->set_server_name_and_port($host,$port); |
|
42
|
23
|
|
|
|
|
85
|
return; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# overload this to catch Feersum errors and exceptions thrown by request |
|
46
|
|
|
|
|
|
|
# callbacks. |
|
47
|
0
|
|
|
0
|
1
|
|
sub DIED { Carp::confess "DIED: $@"; } |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
|
50
|
|
|
|
|
|
|
__END__ |