Alien-GvaScript
view release on metacpan or search on metacpan
lib/Alien/GvaScript.pm view on Meta::CPAN
package Alien::GvaScript;
use strict;
use warnings;
use File::Copy qw(copy);
use File::Path qw(mkpath);
our $VERSION = '1.45';
sub path {
(my $path = __FILE__) =~ s[\.pm$][/lib];
return $path;
}
sub html {
(my $html_path = __FILE__) =~ s[\.pm$][/html];
return $html_path;
}
sub install {
my ($class, $destdir) = @_;
if (!-d $destdir) {
mkpath( $destdir )
or die "can't create '$destdir'; $!";
}
my $path = $class->path();
my @files = grep { -f $_ } glob "$path/*";
foreach my $file (@files) {
copy( $file, $destdir )
or die "can't copy '$file' to '$destdir'; $!";
}
}
1;
__END__
=encoding ISO8859-1
=head1 NAME
Alien::GvaScript - Gva extension to the prototype javascript framework
=head1 SYNOPSIS
use Alien::GvaScript;
...
$path = Alien::GvaScript->path();
...
Alien::GvaScript->install( $my_destination_directory );
=head1 DESCRIPTION
GvaScript (pronounce "gee-vascript") is a javascript framework
born in Geneva, Switzerland (C<GVA> is the IATA code for
Geneva Cointrin International Airport).
It is built on top of the B<prototype>
object-oriented javascript framework (L<http://www.prototypejs.org>)
and offers a number of extensions and widgets, such as
keymap handling, application-specific events,
autocompletion on input field, tree navigation, and
forms with autofocus and repeated sections.
These functionalities are described in separate
documentation pages (see L<Alien::GvaScript::Intro>).
GvaScript is distributed using Perl tools, but the actual
content of the library is pure javascript; hence its
location in the Alien namespace (see the L<Alien> manifesto).
GvaScript runtime library does not need Perl; you can integrate
it in any other Web programming framework. Perl is only needed for
developers who want to modify GvaScript sources and recreate a
distribution package.
=head1 INSTALLATION
=head2 With usual Perl CPAN tools
Install C<Alien::GvaScript> just as any other CPAN module. Then you can
write
perl -MAlien::GvaScript -e "Alien::GvaScript->install('/my/web/directory')"
to copy the dthml files to your Web server.
( run in 1.066 second using v1.01-cache-2.11-cpan-efa8479b9fe )