| blib/lib/Gopher/Server/ParseRequest.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 7 | 9 | 77.7 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 3 | 3 | 100.0 |
| pod | n/a | ||
| total | 10 | 12 | 83.3 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | |||||||
| 2 | package Gopher::Server::ParseRequest; | ||||||
| 3 | 3 | 3 | 83141 | use strict; | |||
| 3 | 6 | ||||||
| 3 | 105 | ||||||
| 4 | 3 | 3 | 16 | use warnings; | |||
| 3 | 7 | ||||||
| 3 | 74 | ||||||
| 5 | 3 | 3 | 4230 | use Net::Gopher::Request; | |||
| 0 | |||||||
| 0 | |||||||
| 6 | |||||||
| 7 | # Constants | ||||||
| 8 | sub HOST () { "localhost" } | ||||||
| 9 | sub PORT () { 70 } | ||||||
| 10 | |||||||
| 11 | sub parse | ||||||
| 12 | { | ||||||
| 13 | my ($class, $str) = @_; | ||||||
| 14 | |||||||
| 15 | my $request = Net::Gopher::Request->new( 'Gopher', | ||||||
| 16 | Host => HOST, | ||||||
| 17 | Port => PORT, | ||||||
| 18 | Selector => $str, | ||||||
| 19 | ); | ||||||
| 20 | |||||||
| 21 | return $request; | ||||||
| 22 | } | ||||||
| 23 | |||||||
| 24 | 1; | ||||||
| 25 | __END__ |