| 1 | #!/usr/local/bin/perl | ||||||||||||||||||
| 2 | 4 | ▶ | use warnings; | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 3 | 4 | ▶ | use strict; | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 4 | 4 | my $rm = $ENV{REQUEST_METHOD}; | |||||||||||||||||
| 5 | 4 | ▶ | if (! $rm) { | ||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||
| 6 | 0 | die "No request method"; | |||||||||||||||||
| 7 | } | ||||||||||||||||||
| 8 | 4 | ▶ | if ($rm eq 'POST') { | ||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||
| 9 | 1 | print <<EOF; | |||||||||||||||||
| 10 | Status: 405 | ||||||||||||||||||
| 11 | Allow: GET, HEAD | ||||||||||||||||||
| 12 | |||||||||||||||||||
| 13 | EOF | ||||||||||||||||||
| 14 | } | ||||||||||||||||||
| 15 | elsif ($rm eq 'GET') { | ||||||||||||||||||
| 16 | 1 | print <<EOF; | |||||||||||||||||
| 17 | Content-Type: text/plain | ||||||||||||||||||
| 18 | |||||||||||||||||||
| 19 | Greetings | ||||||||||||||||||
| 20 | EOF | ||||||||||||||||||
| 21 | } | ||||||||||||||||||
| 22 | elsif ($rm eq 'HEAD') { | ||||||||||||||||||
| 23 | 1 | print <<EOF; | |||||||||||||||||
| 24 | Content-Type: text/plain | ||||||||||||||||||
| 25 | |||||||||||||||||||
| 26 | EOF | ||||||||||||||||||
| 27 | } | ||||||||||||||||||
| 28 | else { | ||||||||||||||||||
| 29 | 1 | print <<EOF; | |||||||||||||||||
| 30 | Status: 501 | ||||||||||||||||||
| 31 | |||||||||||||||||||
| 32 | EOF | ||||||||||||||||||
| 33 | } | ||||||||||||||||||
| 34 | |||||||||||||||||||