Example 12-1. examples/www/static.t
#!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; use LWP::Simple qw(get); my $home = get 'http://test_server/'; ok $home, 'There is a response';
Fetch a page and check if there is response at all.
$ perl static.t ok 1 - There is a response 1..1
| Prev | Home (Copyright Gabor Szabo) Perl Training Israel | Next |
| Small test HTTP server | Up | Fetching a not-existing static page |