line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
22318
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
67
|
|
2
|
1
|
50
|
|
1
|
|
8
|
BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
60
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Tie::Handle::SkipHeader; |
5
|
|
|
|
|
|
|
# ABSTRACT: Tied handle that hides an RFC822-style header |
6
|
|
|
|
|
|
|
our $VERSION = '0.003'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
589
|
use Tie::Handle::Offset; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
213
|
|
9
|
|
|
|
|
|
|
our @ISA = qw/Tie::Handle::Offset/; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub TIEHANDLE |
12
|
|
|
|
|
|
|
{ |
13
|
1
|
|
|
1
|
|
743
|
my $class = shift; |
14
|
1
|
50
|
|
|
|
11
|
pop if ref $_[-1] eq 'HASH'; # we don't take any arguments |
15
|
1
|
|
|
|
|
17
|
return $class->SUPER::TIEHANDLE(@_); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# read to blank/whitespace line and set offset right after |
19
|
|
|
|
|
|
|
sub OPEN |
20
|
|
|
|
|
|
|
{ |
21
|
1
|
|
|
1
|
|
3
|
my $self = shift; |
22
|
1
|
|
|
|
|
10
|
my $rc = $self->SUPER::OPEN(@_); |
23
|
1
|
|
|
|
|
53
|
while ( my $line = <$self> ) { |
24
|
4
|
100
|
|
|
|
25
|
last if $line =~ /\A\s*\Z/; |
25
|
|
|
|
|
|
|
} |
26
|
1
|
|
|
|
|
7
|
$self->offset( tell($self) ); |
27
|
1
|
|
|
|
|
4
|
return $rc; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# vim: ts=2 sts=2 sw=2 et: |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |