Prerequisites
------------------------------------------------------------------------------

* Perl >= 5.8 (http://perl.org)

If a module is listed as "opt." (optional), meaning that clive runs without
the module but the features depending on that module are disabled.

* Config::Tiny/2.12         * BerkeleyDB/0.34
* WWW::Curl/4.05            * URI::Escape/3.29
* HTML::TokeParser/2.37     * XML::Simple/2.18
* Clipboard/0.09 (opt.)     * IO::Pager/0.05 (opt.)
* Expect/1.21 (opt.)

Most distros should have the above versions available as packages.
If not, you can still use CPAN to install the missing modules, e.g.:
    % cpan install WWW::Curl # as root


Installation
------------------------------------------------------------------------------

Extract:
    % tar xvjf clive-$release.tar.bz2
    % cd clive-$release

Run:
    % ./clive [option]... [URL]...

Getting started:
    % ./clive --manual

    The manual page is written in Perl Pod markup language and it is embedded
    in the script file. See "perldoc perlpod" for more info. For example:
      % pod2man clive > clive.1
    Or:
      % ./genman # Same as above but with suitable options

See also:
    configrc file for an example of a configuration file.


Installation: FreeBSD
------------------------------------------------------------------------------

From the Ports:
---------------

 * lang/perl5.8
 * databases/p5-BerkeleyDB
 * textproc/p5-XML-Simple
 * security/p5-Digest-SHA
 * devel/p5-Config-Tiny
 * www/p5-HTML-Parser

 Optional:
 * x11/p5-Clipboard  # --paste
 * lang/p5-Expect    # --clivepass
 * devel/p5-IO-Pager # --show

WWW::Curl (www/p5-WWW-Curl) module is outdated (3.02) in the Ports
at the time of writing this. There are currently two ways to work
around this:

  1) Patch www/p5-WWW-Curl to 4.05 # For the adventurous

    % cd /usr/ports/www/p5-WWW-Curl
      (backing up this directory is recommended)
    % fetch \
        "http://www.freebsd.org/cgi/query-pr.cgi?prp=125323-1-txt&n=/patch.txt"
    % patch -p1 < patch.txt
    % make install clean

  2) Install from CPAN. It's worth noting that this is likely to cause
  cpan to install quite a few other (sometimes unnecessary) modules.

    You can pre-install some of the modules from the Ports:
      - devel/p5-ExtUtils-MakeMaker
      - textproc/p5-XML-DOM
      - devel/p5-Date-Manip
      - devel/p5-Parse-Yapp
      - devel/p5-IO-Tty
      - www/p5-libwww

    % cpan install WWW::Curl # as root


Installation: Debian/Ubuntu et al
------------------------------------------------------------------------------

NOTE: This section is likely to be inaccurate. It is likely that these distros
have the clive package available anyway.

From apt: # Typically: "sudo apt-get install $package"
  * libcurl4-openssl-dev # Required to build WWW::Curl 4.05 using CPAN
  * libhtml-parser-perl
  * libconfig-tiny-perl
  * libberkeleydb-perl
  * libdigest-sha-perl
  * libxml-simple-perl
  * libfile-spec-perl
  * liburi-perl 
  * perl-doc
  -- Optional:
  * libexpect-perl
  * xclip (for Clipboard module below)

From CPAN: # Typically: "sudo cpan install $module"
  * WWW::Curl
  -- Optional:
  * IO::Pager
  * Clipboard
