NAME JavaScript::MochiKit - JavaScript::MochiKit makes Perl suck less SYNOPSIS #!/usr/bin/perl use strict; use warnings; use JavaScript::MochiKit; JavaScript::MochiKit::require('Base', 'Async'); print JavaScript::MochiKit::javascript_definitions; DESCRIPTION FUNCTIONS JavaScript::MochiKit::require( @classes ) Loades the given MochiKit classes and also their javascript-code (unless "$JavaScript-Mochikit::LOADJAVASCRIPT" is 0). Returns 1 on success, dies on error. JavaScript::MochiKit::require_all( ) Loades all MochiKit classes and also their javascript-code (unless "$JavaScript-Mochikit::LOADJAVASCRIPT" is 0). Returns 1 on success, dies on error. JavaScript::MochiKit::is_required( $class ) Returns 1 if class has already been loaded, 0 otherwise. JavaScript::MochiKit::javascript_definitions( @classes ) 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. METHODS GLOBAL VARIABLES $JavaScript::Mochikit::DEBUG Enables debug-information-output to STDERR. Default 0 $JavaScript::Mochikit::LOADJAVASCRIPT If value is 0, "JavaScript::MochiKit::require" will not load the javascript-code into memory. Useful if javascript-code is available as external files. (NOTE: "JavaScript::Mochikit::javascript_definitions" will always load the javascript-code into memory.) Default 1 $JavaScript::Mochikit::VERSION Returns the current JavaScript-Mochikit version number. SEE ALSO HTML::Prototype, Catalyst , , AUTHOR Sascha Kiefer, "esskar@cpan.org" LICENSE This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.