lib/Spreadsheet/Engine/Function/LEN.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 2 | 2 | 100.0 |
total | 19 | 19 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Spreadsheet::Engine::Function::LEN; | ||||||
2 | |||||||
3 | 28 | 28 | 147 | use strict; | |||
28 | 57 | ||||||
28 | 1135 | ||||||
4 | 28 | 28 | 149 | use warnings; | |||
28 | 65 | ||||||
28 | 740 | ||||||
5 | |||||||
6 | 28 | 28 | 147 | use base 'Spreadsheet::Engine::Fn::text'; | |||
28 | 60 | ||||||
28 | 4630 | ||||||
7 | |||||||
8 | sub calculate { | ||||||
9 | 135 | 135 | 1 | 4212 | my ($self, $string) = @_; | ||
10 | 135 | 940 | return length $string; | ||||
11 | } | ||||||
12 | |||||||
13 | 135 | 135 | 1 | 617 | sub result_type { 'n' } | ||
14 | |||||||
15 | 1; | ||||||
16 | |||||||
17 | __END__ |