line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::OnePiece; |
2
|
1
|
|
|
1
|
|
767
|
use 5.008005; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
37
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
4
|
1
|
|
|
1
|
|
15
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
839
|
use IO::File; |
|
1
|
|
|
|
|
11941
|
|
|
1
|
|
|
|
|
431
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = "0.02"; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _options { |
11
|
|
|
|
|
|
|
return {} |
12
|
0
|
|
|
0
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
16
|
0
|
|
|
|
|
|
my $file = shift; |
17
|
0
|
|
|
|
|
|
my $options = $class->_options; |
18
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
|
|
|
my $io = IO::File->new($file, 'r') or die "Usage: Acme::OnePiece->new(\$filename)\n" . $!; |
20
|
0
|
|
|
|
|
|
my @lines = $io->getlines; |
21
|
0
|
|
|
|
|
|
my $contents = join('',@lines); |
22
|
0
|
|
|
|
|
|
$options->{contents} = $contents; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my $self = bless $options, $class; |
25
|
0
|
|
|
|
|
|
return $self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub onepiece { |
29
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
30
|
0
|
|
|
|
|
|
my $contents = $self->{contents}; |
31
|
0
|
|
|
|
|
|
$contents =~ s/(\n+|\s+)/-/g; |
32
|
0
|
|
|
|
|
|
$contents =~ s/-+/-/g; |
33
|
0
|
|
|
|
|
|
return $contents; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
__END__ |