| blib/lib/Business/OnlinePayment/PPIPayMover/URLEncoder.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 4 | 4 | 100.0 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 1 | 1 | 100.0 |
| pod | 0 | 1 | 0.0 |
| total | 5 | 6 | 83.3 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Business::OnlinePayment::PPIPayMover::URLEncoder; | ||||||
| 2 | require Exporter; | ||||||
| 3 | @ISA = qw(Exporter); | ||||||
| 4 | @EXPORT = qw(Encode); | ||||||
| 5 | |||||||
| 6 | 1; | ||||||
| 7 | |||||||
| 8 | sub Encode { | ||||||
| 9 | #my $self = shift; | ||||||
| 10 | 300 | 300 | 0 | 476 | my $value = shift; | ||
| 11 | |||||||
| 12 | 300 | 506 | $value =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg; | ||||
| 23 | 139 | ||||||
| 13 | 300 | 884 | return $value; | ||||
| 14 | } |