| lib/Spreadsheet/Engine/Function/FACT.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 13 | 13 | 100.0 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 4 | 4 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 18 | 18 | 100.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Spreadsheet::Engine::Function::FACT; | ||||||
| 2 | |||||||
| 3 | 28 | 28 | 147 | use strict; | |||
| 28 | 60 | ||||||
| 28 | 1046 | ||||||
| 4 | 28 | 28 | 143 | use warnings; | |||
| 28 | 58 | ||||||
| 28 | 818 | ||||||
| 5 | |||||||
| 6 | 28 | 28 | 146 | use base 'Spreadsheet::Engine::Fn::math'; | |||
| 28 | 126 | ||||||
| 28 | 4154 | ||||||
| 7 | |||||||
| 8 | sub calculate { | ||||||
| 9 | 295 | 295 | 1 | 13846 | my ($self, $value) = @_; | ||
| 10 | 295 | 515 | my $result = 1; | ||||
| 11 | 295 | 1402 | $result *= $_ for 1 .. $value; | ||||
| 12 | 295 | 6336 | return $result; | ||||
| 13 | } | ||||||
| 14 | |||||||
| 15 | 1; | ||||||
| 16 | |||||||
| 17 | __END__ |