NAME
Test::Ping - Testing pings using Net::Ping
VERSION
Version 0.05
SYNOPSIS
This module helps test pings using Net::Ping
use Test::More tests => 1;
use Test::Ping;
ping_ok( $host, "able to ping $host" );
...
SUBROUTINES/METHODS
ping_ok( $host, $test )
Checks if a host replies to ping correctly.
EXPORT
ping_ok
SUPPORTED VARIABLES
Only variables which have tests would be noted as supported. Tests is actually what I'm working on right now.
PROTO
Important to note: setting this will reset the object and everything it's using back to defaults. Why? Because that's how it works, and I don't intend to bypass it - if at all - until a much later stage.
INTEND-TO-SUPPORT VARIABLES
These are variables I intend to support, so stay tuned or just send a patch.
TIMEOUT
SOURCE_VERIFY
SERVICE_CHECK
TCP_SERVICE_CHECK
DISABLED TILL FURTHER NOTICE VARIABLES
PORT
BIND
INTERNAL METHODS
_update_variables($tb)
Updates the internal variables, used by Net::Ping.
Gets the test builder object, returns nothing.
Soon to be deprecated.
_has_var_ok( $var_name, $var_value, $description )
Gets a variable name to test, what to test against and the name of the test. Runs an actual test using Test::Builder.
This is used to debug the actual module, if you wanna make sure it works.
use Test::More tests => 1;
use Test::Ping;
$Test::Ping::PROTO = 'icmp';
_has_var_ok( 'PROTO', 'icmp', 'has correct protocol' )
At a later stage, hopefull as soon as possible, this will actually run this:
is( Test::Ping->_ping_object()->{'proto'}, 'icmp', 'has correct protocol' )
However, you'll still be able to use the first syntax.
For _ping_object() method, keep reading.
_ping_object
When debugging behavior, fetching an internal object from a producedural module can be a bit difficult (especially when it has base inheritence with another one).
This method allows you (or me) to fetch the actual Net::Ping object from Test::Ping. It eases testing and assurance.
This is used by the Tie functions to set the variables for the object for you.
AUTHOR
Sawyer X, <xsawyerx at cpan.org>
BUGS
Please report any bugs or feature requests to bug-test-ping at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Ping.
There is also a GitHub issue tracker at http://github.com/xsawyerx/test-ping/issues which I'll probably check just as much.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Test::Ping
If you have Git, this is the clone path:
git@github.com:xsawyerx/test-ping.git
You can also look for information at:
GitHub Website:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Thanks to everyone who works and contributed to Net::Ping. This module depends solely on it.
COPYRIGHT & LICENSE
Copyright 2009 Sawyer X, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.