Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

itub (5708)


Pause ID: ITUB []
PerlMol []
AnnoCPAN []
POD Indexing Project []

Journal of itub (5708)

Tuesday September 13, 2005
06:59 PM

Pod Indexing Project Status and Plans

Here's the current status for the Pod Indexing Project.


* The deadline for perl-5.8.8 is 2005-10-16
* 13 files have been indexed so far (1685 entries)
* Pod-Index-0.12 is available on CPAN
* Please try the online demo at . This is just a thin CGI wrapper around the underlying modifications to perldoc.
* Please look at "PLAN" and "WHAT YOU CAN DO" below if you want to help.


As of this writing, these are the files that have been indexed. The latest stats are available at .

  71 perldata
483 perlfunc
  34 perlmod
  41 perlobj
282 perlop
  78 perlpod
183 perlre
  73 perlref
  80 perlrun
  78 perlsub
  79 perlsyn
  44 perltie
159 perlvar
1685 total

(the first column is the number of entries for that file).

This already covers a major part of the "central" documentation (the pods labeled "Reference Manual" in perl.pod, particularly the first paragraph of the list).


Pod-Index-0.12 is available on CPAN. It includes modules for parsing the pods, extracting the X index entries, generating the index, searching the index, and extracting the relevant sections from the pods.

A modified perldoc is available at . This perldoc adds the "-k" option for searching the index. It requires Pod-Index to do the searching. If these modifications are added to the core perl distribution, Pod-Index would have to be added as well.


According to Nicholas Clark, Changes should be in blead by midnight (GMT) on the 16th October 2005 to make it into perl-5.8.8. So far, I've done all of the indexing myself. I've heard from people who say they are interested, but no one has sent me indexed files yet. I'd like to get as many as possible of the "Reference Manual" done by then, and then maybe some of the tutorials as well.


Besides indexing the files, you can also try the current index at , and let me know if some searches don't return what you would expect (given the files currently indexed).

Tuesday August 02, 2005
09:39 AM

Confirmed: Java is the new COBOL!

This an actual summary for an actual Java book:

COBOL Programmers Swing with Java by E. Reed Doke, Bill C. Hardgrave and Richard A. Johnson Cambridge University Press © 2005 (296 pages) ISBN: 0521546842

By drawing on the many similarities between COBOL and Java, this clear, comprehensive text introduces COBOL programmers to the history of Java and OO programming, then dives into details of the Java syntax, always contrasting with parallels in COBOL.

Friday July 29, 2005
01:21 PM

POD Indexing Project

Check out the POD Indexing Project. The goal is to make the Perl documentation more searchable and accessible.
Monday April 11, 2005
01:51 PM

JavaScript includes and namespaces -- an iframe hack

I read with great interest schwern's thread about JavaScript's lack of includes and namespaces. A common answer for the include problem is that you can include your JavaScript "modules" via HTML like this:

<script src="module1.js"></script>

but the problem, as Schwern pointed out, is that if module1.js wants to include module2.js, the user has to include both in HTML-space, which breaks encapsulation.

Sean Burke came up with a solution which addresses the problem by first loading a bootstrapping script, bootstrap.js.

I decided to try a different hack in HTML, by using hidden iframes. First, a disclamer: this was a quick hack, so it is certainly not perfect, and I wouldn't be surprised if someone invented it before, but I came up with this on my own. ;-) Let's see how it works. First, in test.html:

<!-- include module1 -->
<iframe name="module1" src="module1.html" style="display:none"></iframe>

<p onclick="module1.my_func();">module1.my_func()</p>
<p onclick="module1.module2.my_func();">module1.module2.my_func()</p>

Then, in module1.html:

<!-- include module2 -->
<iframe name="module2" src="module2.html" style="display:none"></iframe>

<script type="text/javascript">
function my_func() {

And in module2.html:

<script type="text/javascript">
function my_func() {

To summarize:

  • iframe is used as the equivalent of an include statement
  • The JS code resides in HTML files, which may have further iframes for including more code.
  • The "namespaces" (i.e., the frames) get nested: when module1 includes module2, module2 can be accessed from the "main package" as module1.module2. This may be problematic if two different modules (say, module1a and module1b) include the same module (say, module2), because then module2 would be included twice and have two different "namespaces": module1a.module2 and module1b.module2.
  • Another caveat is that it requires support for iframes and CSS. If the user disables CSS, an ugly empty frame will be shown (perhaps it can also be hidden by changing it size via HTML attributes, but I didn't try that).