| 1 | =head1 NAME | ||
| 2 | |||
| 3 | Probe::MachineInfo::IpAddress - Ip Address | ||
| 4 | |||
| 5 | =head1 SYNOPSIS | ||
| 6 | |||
| 7 | blah | ||
| 8 | |||
| 9 | =head1 DESCRIPTION | ||
| 10 | |||
| 11 | blah | ||
| 12 | |||
| 13 | =head1 PUBLIC INTERFACE | ||
| 14 | |||
| 15 | =cut | ||
| 16 | |||
| 17 | package Probe::MachineInfo::IpAddress; | ||
| 18 | |||
| 19 | |||
| 20 | # pragmata | ||
| 21 | use base qw(Probe::MachineInfo::SimpleMetric); | ||
| 22 | use strict; | ||
| 23 | use warnings; | ||
| 24 | |||
| 25 | # Standard Perl Library and CPAN modules | ||
| 26 | |||
| 27 | # | ||
| 28 | # CLASS ATTRIBUTES | ||
| 29 | # | ||
| 30 | |||
| 31 | # | ||
| 32 | # CONSTRUCTOR | ||
| 33 | # | ||
| 34 | |||
| 35 | |||
| 36 | =head3 command | ||
| 37 | |||
| 38 | /sbin/ifconfig -v | ||
| 39 | |||
| 40 | =cut | ||
| 41 | |||
| 42 | sub command { | ||
| 43 | my($self) = @_; | ||
| 44 | |||
| 45 | return '/sbin/ifconfig -v'; | ||
| 46 | |||
| 47 | } | ||
| 48 | |||
| 49 | =head3 linenumber | ||
| 50 | |||
| 51 | linenumber() | ||
| 52 | |||
| 53 | =cut | ||
| 54 | |||
| 55 | sub linenumber { | ||
| 56 | my($self) = @_; | ||
| 57 | |||
| 58 | return 1; | ||
| 59 | |||
| 60 | } | ||
| 61 | |||
| 62 | =head3 regex | ||
| 63 | |||
| 64 | regex() | ||
| 65 | |||
| 66 | =cut | ||
| 67 | |||
| 68 | sub regex { | ||
| 69 | my($self) = @_; | ||
| 70 | return qr/^\s*inet addr:(\S+)/; | ||
| 71 | } | ||
| 72 | |||
| 73 | 1; | ||
| 74 | |||
| 75 | =head1 AUTHOR | ||
| 76 | |||
| 77 | Sagar R. Shah | ||
| 78 | |||
| 79 | =cut |