index 95532cb9734a15faa9fdc38bb31f907520516b54..e03bed4d0a30bd2635d57e7ef55bf04864a6a4ea 100644 (file)
package POE::Component::ArpWatch;
use strict;
+use warnings;
-use POE;
-
-use POE::Component::Pcap;
+BEGIN{
+ eval('use POE');
+ eval('use POE::Component::Pcap');
+ eval('use NetPacket::Ethernet qw( :types )');
+ eval('use NetPacket::ARP qw( :opcodes )');
+}
-use NetPacket::Ethernet qw( :types );
-use NetPacket::ARP qw( :opcodes );
+END{
+}
## Map arp opcode #'s to strings
my %arp_opcodes = (
sub _ipaddr { join( ".", unpack( "C4", pack( "N", oct( "0x". shift ) ) ) ) }
sub _phys { join( ":", grep {length} split( /(..)/, shift ) ) }
+# vim:ts=4:shiftwidth:expandtab
1;
__END__