HTML::JQuery is a Perl module that acts as a bridge between Perl and JQuery/JavaScript. It enables Perl programmers to do as much Javascript as they can using Perl. You can create modals, key sequences and even build javascript functions using Perl subroutines. The aim is simple: More Perl, less Javascript.
SYNOPSIS
Inject Javascript/JQuery into your web apps using Perl.
my $j = HTML::JQuery->new;
# build a javascript function that injects pure javascript,
# HTML::JQuery generated javascript, or both.
$j->function(myFuncName => sub {
my $modal = $j->modal({
title => 'My Modal Title',
message => 'The content inside my modal',
});
qq {
alert('We can inject pure javascript like this');
$modal
};
});
In the above example, when myFuncName() is called an alert box will open, then the modal We can call it using an event handler.. yeah, we can do this with Perl, too.
$j->onClick({ class => 'button', event => $j->callFunc('myFuncName') });
So if we add a link, like < a class="button" href="#" >Click Me to activate myFuncName< /a > It will run our newly created function.
Product's homepage
Requirements:
· Perl