View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
CorData > Kwiki-JSLog > Kwiki::JSLog



Annotate this POD


New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  


Kwiki::JSLog - Provides JSLog library for Kwiki


This module should be optional and only really needed for developers of your module. For this reason it does not load itself and therefore it is not automatically included in the list of javascript files. Your module must dynamically load the javascript file this module provides if it is needed. The Kwiki-TableOfContents module provides a great example code for doing this. The example code requires the prototype library and the scriptaculous library but code could easy be created that does not depend on these libraries. Below is the example code:

        debug = Prototype.emptyFunction;
        jslog = new Object();
        $A(['debug', 'info', 'warning', 'error', 'text']).each(function(func) {
                jslog[func] = Prototype.emptyFunction;
        if (location.href.match(/jslog\=enable/)) {

As you can see jslog.js is not included unless jslog=enable is in the URL requested. Since a normal use will never request a URL with that in it then the library will never be used. But to enable the log simply install this module in the Kwiki installation and add that to your URLs. Empty functions are used when this library is not included allowing you to leave your logging code in the production modules.


Eric Anderson, <eric at>


Andre Lewis for developing the JSLog library. Without it debugging in Javascript would have been much harder while working in IE.


Copyright 2006 CorData, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See

syntax highlighting: