The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Egg::Plugin::Net::Ping - Net::Ping for Egg plugin.

SYNOPSIS

  use Egg qw/ Net::Ping /;
  
  __PACKAGE__->egg_startup(
    ...
    .....
    plugin_net_ping => {
      protcol => 'tcp',
      timeout => 3,
      retry   => 1,
      wait    => 0.5,
      },
    );

  if ( $e->ping('192.168.1.1') ) {
    print " Ping was answered. !! ";
  } else {
    print " There is no answer to Ping. ";
  }

DESCRIPTION

It is a plug-in to investigate while arbitrary PC is operating by Net::Ping.

CONFIGURATION

Please set 'plugin_net_ping'.

protcol

They are the protocols such as tcp and udp.

Default is 'tcp'.

* I do not think that it operates well perhaps excluding tcp.

timeout

Time to wait for answer of ping.

Default is '3'.

retry

Frequency in which ping is done.

wait

Waiting time to doing next retry.

Default is '0.5'.

self_addr

Own host address.

METHODS

ping ( [TARGET_HOST], [ARGS_HASH] )

Ping is sent to TARGET_HOST, and the succeeding frequency is returned.

ARGS_HASH overwrites initialization.

* When retry is set to five times or more, five is compulsorily set.

  $e->ping('192.168.1.111', retry => 5 );

SEE ALSO

Net::Ping, Egg::Release,

AUTHOR

Masatoshi Mizuno <lushe@cpan.org>

COPYRIGHT

Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.