Skip Menu |

This queue is for tickets about the Net-MAC CPAN distribution.

Report information
The Basics
Id: 34680
Status: resolved
Priority: 0/
Queue: Net-MAC

People
Owner: OLIVER [...] cpan.org
Requestors: ncharles [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.3
Fixed in: (no value)



Subject: unspecified delimiter
I'm using Net::MAC to do some mac address formatting and I was wondering if not specifying a delimiter is valid? i.e. The following code Show quoted text
-----------------------begin code ------------------------------------ #!/usr/bin/perl use Net::MAC; $macaddr = "00:11:22:33:44:55"; print "$macaddr\n"; my $mac = Net::MAC->new('mac' => "$macaddr"); my $con_mac = $mac->convert( 'bit_group' => 8, # octet grouping #'delimiter' => ':'# dot-delimited ); $foo_mac=$con_mac->get_mac(), "\n"; print "$foo_mac\n";
------------------------end code ------------------------------------- gives the following output; 00:11:22:33:44:55 Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.5/Net/MAC.pm line 299. Use of uninitialized value in regexp compilation at /usr/lib/perl5/site_perl/5.8.5/Net/MAC.pm line 300. 001122334455
From: OLIVER [...] cpan.org
Hello Nathan, On Fri Apr 04 15:38:40 2008, ncharles wrote: Show quoted text
> I'm using Net::MAC to do some mac address formatting and I was > wondering if not specifying a delimiter is valid?
Yes, this is a bug in the Net::MAC module; thanks for the heads-up. I have just submitted a new version 1.4 of Net::MAC which has a fix in for the issue you found. Please read the updated documentation for the convert() method. Because the convert() method overrides all MAC properties, I plan to add a new method in the future, possibly called 'clone()', which would allow altering of some parameters but keeping the other properties of the old MAC Address. regards, oliver.