Test::Net::Service - test different network services
my $net_service = Test::Net::Service->new( 'host' => 'camel.cle.sk', 'proto' => 'tcp', ); eval { $net_service->test( 'port' => 22, 'service' => 'ssh', ); };
This should a collection of basic test for network services. Check the list and the description Services.
All optional for constructor. Will be used as defaults if set.
host socket proto port service
Constructor. You set any property and it will be used as defaults for <-test()>> method.
<-
Perform the service test. Add any additional || different parameters to the default ones as function arguments.
INTERNAL methd to connect to the host&port if needed.
Will aways succeed if the connection is sucesfull. Additionaly it will return hash ref of all the arguments that will be used to connect and test. Can be used when you want to always pass the test or for debugging.
Will check for SSH string in the first line returned by server after connection.
Need 'host' to be passed. Will make GET http request for this host.
Checks if the first line of the server response beginns with 'HTTP'.
TODO
Jozef Kutej
To install Test::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Server
CPAN shell
perl -MCPAN -e shell install Test::Server
For more information on module installation, please visit the detailed CPAN module installation guide.