5 use Test::More tests => 4;
7 use_ok 'IO::Socket::INET';
8 use Data::Dump qw(dump);
10 our $sock = IO::Socket::INET->new(
15 PeerAddr => '255.255.255.255',
17 ) or die "need root priviledges to run: $!";
19 foreach my $hex_dump ( glob 't/dhcp/*' ) {
20 ok( open(my $fh, '<', $hex_dump), "open $hex_dump" );
22 ok( my $hex = <$fh>, 'slurp' );
24 diag "hex: ",dump $hex;
25 my $packet = pack 'H*', $hex;
26 diag "packet: ", dump $packet;
28 ok( $sock->send($packet), 'send' );