| lib/Spreadsheet/Engine/Function/LEFT.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::LEFT; | ||||||
| 2 | |||||||
| 3 | 28 | 28 | 156 | use strict; | |||
| 28 | 55 | ||||||
| 28 | 911 | ||||||
| 4 | 28 | 28 | 197 | use warnings; | |||
| 28 | 60 | ||||||
| 28 | 766 | ||||||
| 5 | |||||||
| 6 | 28 | 28 | 142 | use base 'Spreadsheet::Engine::Fn::text'; | |||
| 28 | 71 | ||||||
| 28 | 3980 | ||||||
| 7 | |||||||
| 8 | 666 | 666 | 1 | 2565 | sub signature { 't', '>=0' } | ||
| 9 | |||||||
| 10 | sub calculate { | ||||||
| 11 | 268 | 268 | 1 | 14126 | my ($self, $string, $len) = @_; | ||
| 12 | 268 | 2575 | return substr $string, 0, $len; | ||||
| 13 | } | ||||||
| 14 | |||||||
| 15 | 1; | ||||||
| 16 | |||||||
| 17 | __END__ |