NAME

shorten_hostname - tries to shorten hostnames while keeping them meaningful

DESCRIPTION

shorten_hostname will try to shorten the hostname string to the length specified. It will cut each domain part to a given length from right to left till the string is short enough or the end of the domain has been reached.

SYNOPSIS

shorten_hostname [-?dEefl] [long options...]
      -? --usage --help               Prints this usage information.
      -l --length                     the desired length of the hostname
                                      string
      -d --keep_digits_per_domain     number of digits per domain
      -e --domain_edge                edge string for truncation of domain
      -f --force                      force string length (truncate)
      -E --force_edge                 edge string for forced truncation of

OPTIONS

-l, --length <int> (required)

The desired maximum length of the hostname string.

-d, --keep_digits_per_domain <int> (default: 3)

Cut each domain part at this length.

-e, --domain_edge <str> (default: off)

If defined this string will be used to replace the end of each domain truncated to indicate that it was truncated.

-f, --force (default: off)

If specified the module will force the length by cutting the result string.

-E, --force_edge <str> (default: off)

If defined this string will be used to replace the end of the string to indicate that it was truncated.

COPYRIGHT

Copyright 2014 Markus Benning <me@w3r3wolf.de>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.