shorten (1) Linux Manual Page
shorten – CLI program to demonstrate use of WWW::Shorten
Synopsis
# Default shortening service is Metamark
$ shorten books.perl.org/book/171
http://xrl.us/dv8
# Change with an environment variable
$ SHORTEN_SERVICE=TinyURL shorten books.perl.org/book/171
http://tinyurl.com/ye7gjf4
# Change with command line option
$ shorten –service=TinyURL books.perl.org/book/171
http://tinyurl.com/ye7gjf4
# Change using config file
$ cat ~/.shortenrc
service = TinyURL
$ shorten books.perl.org/book/171
http://tinyurl.com/ye7gjf4
Configuration
The service used can be controlled in various ways. The program will use the first of the following values that it finds:- •
- The value of the "–service" command line option.
- •
- The value of the "SHORTEN_SERVICE" environment variable.
- •
- The value of the "service" option from the configuration file (see below).
- •
- If none of the above options is found, the program defaults to using Metamark.
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.
shortenconfigGenerally, I use the format:
~/shortenconfig
/etc/shortenconfig
shorten.config
~/shorten.config
/etc/shorten.config
shortenrc
~/shortenrc
/etc/shortenrc
.shortenrc
~/.shortenrc
/etc/.shortenrc
service = MakeAShorterLinkwhich 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.
Bugs, Requests, Comments
Please report any requests, suggestions or bugs via the system at <http://rt.cpan.org/>, or email <bug-WWW-Shorten [at] rt.cpan.org>. This makes it much easier for me to track things and thus means your problem is less likely to be neglected.License And Copyright
Copyright X Magnum Solutions Ltd, 2002 – 2010. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
