shorten man page

shorten — CLI program to demonstrate use of WWW::Shorten


    # Default shortening service is Metamark
    $ shorten

    # Change with an environment variable
    $ SHORTEN_SERVICE=TinyURL shorten

    # Change with command line option
    $ shorten --service=TinyURL

    # Change using config file
    $ cat ~/.shortenrc
    service = TinyURL
    $ shorten

    # Lengthen a URL
    $ shorten -l


The service used can be controlled in various ways. The program will use the first of the following values that it finds:

Configuration File

As we use the "Config::Auto" module for configuration, shorten's fairly flexible when it comes to format.

Configuration will be found in whichever of the following files comes first.


Generally, I use the format:

    service = MakeAShorterLink

which is simple and works. "service" is the only configuration keyword at present. Its value should be a correctly capitalized service name as per WWW::Shorten's documentation.


Iain Truskett <>


See Also



2016-03-25 perl v5.26.0 User Contributed Perl Documentation