Hi,
sorry for the delay, back to work now!
$ wget
http://www.ieee.org/netstorage/standards/oui.txt
--2015-01-08 08:52:54--
http://www.ieee.org/netstorage/standards/oui.txt
Resolving www.ieee.org (www.ieee.org)... 23.209.167.233
Connecting to www.ieee.org (www.ieee.org)|23.209.167.233|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3534183 (3,4M) [text/plain]
Saving to: ‘oui.txt’
100%[==================================================================================================>]
3.534.183 2,74MB/s in 1,2s
2015-01-08 08:52:56 (2,74 MB/s) - ‘oui.txt’ saved [3534183/3534183]
$ file oui.txt
oui.txt: UTF-8 Unicode text, with CRLF line terminators
So the oui.txt from the URL contains carriage return, line feed
line-breaks. Net::MAC::Vendor does not handle these:
perl -e "use Data::Dumper; use File::Spec; use Net::MAC::Vendor;
Net::MAC::Vendor::load_cache('file://'.File::Spec->rel2abs('oui.txt'));
print scalar keys \$Net::MAC::Vendor::Cached;"
0
Converting the oui.txt to Unix line-breaks makes it work:
$ dos2unix oui.txt
dos2unix: converting file oui.txt to Unix format ...
$ perl -e "use Data::Dumper; use File::Spec; use Net::MAC::Vendor;
Net::MAC::Vendor::load_cache('file://'.File::Spec->rel2abs('oui.txt'));
print scalar keys \$Net::MAC::Vendor::Cached;"
20202
I've attached a trivial patch.
Thanks for any feedback!
On 27.12.2014 01:57, brian d foy via RT wrote:
Show quoted text