blib/lib/PDF/Make/Extract/Line.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 100% 4 / 4 totaltotal 100% 38 / 38 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/PDF/Make/Extract/Block.pm ↑ Summary blib/lib/PDF/Make/Extract/Word.pm »
1 package PDF::Make::Extract::Line;
2 53 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 53 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 53 ▶use Object::Proto;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 53 ▶use PDF::Make::Extract::Word;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 53 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
8 53 Object::Proto::define('PDF::Make::Extract::Line',
9 'x0:Num',
10 'y0:Num',
11 'x1:Num',
12 'y1:Num',
13 'baseline:Num',
14 '_words:ArrayRef:arg(words):default([])',
15 );
16 53 Object::Proto::import_accessors('PDF::Make::Extract::Line');
17 }
18  
19 2 ▶sub bbox { (x0($_[0]), y0($_[0]), x1($_[0]), y1($_[0])) }
Subroutine bbox: called CC=1 SCAR=0.0
Pod documented
20  
21 798 ▶sub words {
Subroutine words: called CC=1 SCAR=0.0
Pod documented
22 798 my ($self) = @_;
23 798 return map { PDF::Make::Extract::Word->new(%$_) } @{_words($self)};
24 }
25  
26 2 ▶sub word_count { scalar @{_words($_[0])} }
Subroutine word_count: called CC=1 SCAR=0.0
Pod documented
27  
28 120 ▶sub to_string {
Subroutine to_string: called CC=1 SCAR=0.0
Pod documented
29 120 my ($self) = @_;
30 120 return join ' ', map { $_->text } $self->words;
31 }
32  
33 53 1;
34  
35 __END__
« blib/lib/PDF/Make/Extract/Block.pm ↑ Summary blib/lib/PDF/Make/Extract/Word.pm »