Changeset 741 for trunk/DNSDB.pm


Ignore:
Timestamp:
08/25/16 17:05:13 (8 years ago)
Author:
Kris Deugau
Message:

/trunk

Add another template expansion pattern; %x for the "n'th natural IP in
the range"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r733 r741  
    16551655    my ($c) = ($$tmpl =~ /(\%-?c)/);  my $nld = '';  my $cld = '';
    16561656    $c = '' if !$c;
     1657    my ($cn) = ($$tmpl =~ /(\%x)/);
    16571658    my $skipgw = ($c =~ /\%-c/ ? 0 : 1);
    16581659    my $ipkill = 0;
     1660
     1661    if ($cn) {
     1662      # "natural n'th IP in the block" pattern
     1663      $$tmpl =~ s/$cn/$ipindex+1/e;
     1664    }
    16591665
    16601666##fixme: still have one edge case not handled well:
Note: See TracChangeset for help on using the changeset viewer.