5 module Puppet::Parser::Functions
6 newfunction(:is_domain_name, :type => :rvalue, :doc => <<-EOS
7 Returns true if the string passed to this function is a valid IP address. Support for IPv4 and IPv6 address types is included.
11 if (arguments.size != 1) then
12 raise(Puppet::ParseError, "is_domain_name(): Wrong number of arguments "+
13 "given #{arguments.size} for 1")
18 if domain =~ /^(([a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\.?$/ then
27 # vim: set ts=2 sw=2 et :