Changeset 1685


Ignore:
Timestamp:
01/28/16 13:05:51 (8 years ago)
Author:
nanardon
Message:

IF format does not match, return the input as it is

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Nethost.pm

    r1557 r1685  
    8686                input => sub { 
    8787                    $_[0] or return; 
     88                    $_[0] =~ /^([0-9a-f]{2}([:-]|$)){6}$/i or return $_[0]; 
    8889                    my @elem = split(/[:-]/, $_[0]); 
    89                     return join(':', map { sprintf("%02x", hex($_)) } @elem); 
     90                    return join(':', map { sprintf("%02x", hex($_)) || $_ } @elem); 
    9091                }, 
    9192                checkinputformat => sub { 
Note: See TracChangeset for help on using the changeset viewer.