Win32::Tracert - Call Win32 tracert tool or parse Win32 tracert output;
version 0.002
use Win32::Tracert; my $target = "127.0.0.1"; my $route = Win32::Tracert->new(destination => "$target"); if ($route->to_trace->found){ my $hops_value=$route->hops; if($hops_value >= 1) { print $route->destination_ip,"\n"; print $route->destination_hostname,"\n"; print "I got it\n"; } }
This attribute is used as argument before creating object. It contain the result of tracert output slurp from file. The result must be in array and dereferenced
This attribute is used as argument before creating object. It containt IP adress or Hostname used by tracert to trace the path.
This method is a mutator. It set its value if you pass an argument to it. Otherwise it return its current value like a standard get method. Path is call and set in to_trace method.
This method returns the destination hostname. This information is defined if a route is found to destination.
This method returns the destination ip address. This information is defined if a route is found to destination.
This method create a Win32::Tracert::Parser object from destination or circuit attribute. it set path attribute with the value return by to_parse method from Win32::Tracert::Parser object
This method check from tracert result if we reach the target destination.
This method returns number of hops followed by tracert to reach destination. Value returned is a scalar.
* Win32::Tracert::Parser
Sébastien Deseille <sebastien.deseille@gmail.com>
This software is copyright (c) 2014 by Sébastien Deseille.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Win32::Tracert, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::Tracert
CPAN shell
perl -MCPAN -e shell install Win32::Tracert
For more information on module installation, please visit the detailed CPAN module installation guide.