#!/usr/bin/perl

###############################################################################
# Required inclusions.
###############################################################################
use strict;
use warnings;
use Alien::Prototype::Window;
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-window';

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

=head1 NAME

prototype-window-install - Prototype Window Class installation

=head1 SYNOPSIS

  prototype-window-install [options] destdir

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

=head1 DESCRIPTION

Installs the Prototype Window Class (including all CSS themes and images) into
the specified F<destdir>, using C<Alien::Prototype::Window>.

=head1 OPTIONS

=over

=item B<--quiet>

Install quietly; only error messages will be displayed.

=item B<--help/-?>

Displays a brief help message.

=item B<--man>

Displays the full documenation.

=item B<destdir>

Directory that the Prototype Window Class JS library should be installed into.
Defaults to F<./prototype-window>.

=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::Window>.

=cut
