maddingue / Net-Pcap

Net::Pcap - Interface to pcap(3) LBL packet capture library
3 stars 11 forks source link

doesn't support Mac OS X Yosemite #4

Closed hanbeibei closed 8 years ago

hanbeibei commented 9 years ago

Hi

the error log is below: t/17-lib_version.t ......... 1/2 # libpcap version 1.5.3 - Apple version 47

Failed test ' - checking version string (libpcap version 1.5.3 - Apple version 47)'

at t/17-lib_version.t line 17.

'libpcap version 1.5.3 - Apple version 47'

doesn't match '/^libpcap version (?:\d+.\d+(?:.\d+|[^\d.\s]+)?|unknown (pre 0.8))$/'

Looks like you failed 1 test of 2.

t/17-lib_version.t ......... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests

which seems that it's very easy to fix, just to modify your match regular expression.

sgielen commented 9 years ago

This just bit me too. Regex can be changed to /^libpcap version (?:\d+.\d+(?:.\d+|[^\d.\s]+)?|unknown (pre 0.8))/ (without the anchoring end $) maybe?

hanbeibei commented 9 years ago

yes, seems right..

hanbeibei commented 9 years ago

I'm reading a very old book: perl network programming, which introduce your module..

maddingue commented 8 years ago

Fixed by 25e98f6b141e83b84133b44a67fa4d9c7deebcd8 (merged with b32b086c072f7431bf052fd478b27b1b79298bd7).