Probe::MachineInfo::IpAddress - Ip Address


Probe-MachineInfo documentation Contained in the Probe-MachineInfo distribution.

Index


Code Index:

NAME

Top

Probe::MachineInfo::IpAddress - Ip Address

SYNOPSIS

Top

blah

DESCRIPTION

Top

blah

PUBLIC INTERFACE

Top

command

/sbin/ifconfig -v

linenumber

 linenumber()

regex

  regex()

AUTHOR

Top

Sagar R. Shah


Probe-MachineInfo documentation Contained in the Probe-MachineInfo distribution.
package Probe::MachineInfo::IpAddress;


# pragmata
use base qw(Probe::MachineInfo::SimpleMetric);
use strict;
use warnings;

# Standard Perl Library and CPAN modules

#
# CLASS ATTRIBUTES
#

#
# CONSTRUCTOR
#


sub command {
	my($self) = @_;

	return '/sbin/ifconfig -v';

}

sub linenumber {
	my($self) = @_;

	return 1;

}

sub regex {
	my($self) = @_;
	return qr/^\s*inet addr:(\S+)/;
}

1;