#!/usr/bin/perl

###############################################################################
# Required inclusions.
###############################################################################
use strict;
use warnings;
use Alien::Prototype::Carousel;
use Getopt::Long;
use Pod::Usage;

###############################################################################
# Read in our command line arguments.
###############################################################################
my $quiet;
my ($help, $man);
GetOptions(
    'quiet'     => \$quiet,
    'help|?'    => \$help,
    'man'       => \$man,
    ) || pod2usage(1);
pod2usage(1) if ($help);
pod2usage( -exitstatus=>0, -verbose=>2 ) if ($man);

my $dir = shift || './prototype-carousel';

###############################################################################
# Install the Prototype Carousel.
###############################################################################
print "Installing Prototype Carousel component to $dir\n" unless ($quiet);
Alien::Prototype::Carousel->install( $dir );
print "... done\n" unless ($quiet);


=head1 NAME

prototype-carousel-install - Prototype Carousel component installation

=head1 SYNOPSIS

  prototype-carousel-install [options] destdir

  Options:
    --quiet     Install quietly; only report errors
    --help/-?   Brief help message
    --man       Full documentation
    destdir     Directory to install to (default "./prototype-carousel")

=head1 DESCRIPTION

Installs the Prototype Carousel component (including CSS file) into the
specified F<destdir>, using C<Alien::Prototype::Carousel>.

=head1 OPTIONS

=over

=item B<--quiet>

Install quietly; only error messages will be displayed.

=item B<--help/-?>

Display a brief help message.

=item B<--man>

Display the full documentation.

=item B<destdir>

Directory that the Prototype Carousel JS library should be installed into.
Defaults to F<./prototype-carousel>.

=back

=head1 AUTHOR

Graham TerMarsch (cpan@howlingfrog.com)

=head1 LICENSE

Copyright (C) 2007, Graham TerMarsch.  All rights reserved.

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

=head1 SEE ALSO

L<Alien::Prototype::Carousel>.

=cut
