JavaScript::MochiKit - JavaScript::MochiKit makes Perl suck less
#!/usr/bin/perl use strict; use warnings; use JavaScript::MochiKit; JavaScript::MochiKit::require('Base', 'Async'); print JavaScript::MochiKit::javascript_definitions;
Loades the given MochiKit classes and also their javascript-code (unless $JavaScript-Mochikit::LOADJAVASCRIPT is 0).
$JavaScript-Mochikit::LOADJAVASCRIPT
Returns 1 on success, dies on error.
Loades all MochiKit classes and also their javascript-code (unless $JavaScript-Mochikit::LOADJAVASCRIPT is 0).
Returns 1 if class has already been loaded, 0 otherwise.
Returns the Javascript code as one big string for all wanted classes. Calls JavaScript::MochiKit::require( ) for all classes that are not loaded yet.
Returns the Javascript code for all loaded classes if @classes is empty. Returns an empty string if no class is loaded.
May die if a unloaded class does not exist.
Enables debug-information-output to STDERR.
Default 0
If value is 0, JavaScript::MochiKit::require will not load the javascript-code into memory.
JavaScript::MochiKit::require
Useful if javascript-code is available as external files. (NOTE: JavaScript::Mochikit::javascript_definitions will always load the javascript-code into memory.)
JavaScript::Mochikit::javascript_definitions
Default 1
Returns the current JavaScript-Mochikit version number.
HTML::Prototype, Catalyst
http://www.perl-community.de, http://www.catalystframework.org, http://www.mochikit.org
Sascha Kiefer, esskar@cpan.org
esskar@cpan.org
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install JavaScript::MochiKit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JavaScript::MochiKit
CPAN shell
perl -MCPAN -e shell install JavaScript::MochiKit
For more information on module installation, please visit the detailed CPAN module installation guide.