itub's Journal itub's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:40:59+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 itub's Journal Pod Indexing Project Status and Plans <p>Here's the current status for the Pod Indexing Project.</p><p>SUMMARY</p><p>* The deadline for perl-5.8.8 is 2005-10-16<br>* 13 files have been indexed so far (1685 entries)<br>* Pod-Index-0.12 is available on CPAN<br>* Please try the online demo at <a href=""></a> . This is just a thin CGI wrapper around the underlying modifications to perldoc.<br>* Please look at "PLAN" and "WHAT YOU CAN DO" below if you want to help.</p><p>I - INDEXED FILES</p><p>As of this writing, these are the files that have been indexed. The latest stats are available at <a href=""></a> .</p><p> &nbsp; 71 perldata<br>483 perlfunc<br> &nbsp; 34 perlmod<br> &nbsp; 41 perlobj<br>282 perlop<br> &nbsp; 78 perlpod<br>183 perlre<br> &nbsp; 73 perlref<br> &nbsp; 80 perlrun<br> &nbsp; 78 perlsub<br> &nbsp; 79 perlsyn<br> &nbsp; 44 perltie<br>159 perlvar<br>-----------<br>1685 total</p><p>(the first column is the number of entries for that file).</p><p>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).</p><p>II - SOFTWARE</p><p>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.</p><p>A modified perldoc is available at <a href=""></a> . 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.</p><p>III - PLAN</p><p>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.</p><p>IV - WHAT YOU CAN DO</p><p>Besides indexing the files, you can also try the current index at <a href=""></a> , and let me know if some searches don't return what you would expect (given the files currently indexed).</p> itub 2005-09-13T23:59:20+00:00 journal Confirmed: Java is the new COBOL! This an actual summary for an actual Java book:<blockquote><div><p>COBOL Programmers Swing with Java by E. Reed Doke, Bill C. Hardgrave and Richard A. Johnson Cambridge University Press &#169; 2005 (296 pages) ISBN: 0521546842 </p><p>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.</p></div></blockquote> itub 2005-08-02T14:39:06+00:00 journal POD Indexing Project Check out the <a href="">POD Indexing Project</a>. The goal is to make the Perl documentation more searchable and accessible. itub 2005-07-29T18:21:50+00:00 newsnews JavaScript includes and namespaces -- an iframe hack I read with great interest <a href="">schwern's thread about JavaScript's lack of includes and namespaces</a>. A common answer for the include problem is that you can include your JavaScript "modules" via HTML like this:<blockquote><div><p> <tt>&lt;script src="module1.js"&gt;&lt;/script&gt;</tt></p></div> </blockquote><p>but the problem, as Schwern pointed out, is that if module1.js wants to include module2.js, the <em>user</em> has to include both in HTML-space, which breaks encapsulation. </p><p>Sean Burke came up with a solution which addresses the problem by first loading a bootstrapping script, <a href="">bootstrap.js</a>. </p><p>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.<nobr> <wbr></nobr>;-) Let's see how it works. First, in test.html:</p><blockquote><div><p> <tt>&lt;!-- include module1 --&gt;<br>&lt;iframe name="module1" src="module1.html" style="display:none"&gt;&lt;/iframe&gt;<br> <br>&lt;p onclick="module1.my_func();"&gt;module1.my_func()&lt;/p&gt;<br>&lt;p onclick="module1.module2.my_func();"&gt;module1.module2.my_func()&lt;/p&gt;</tt></p></div> </blockquote><p>Then, in module1.html:</p><blockquote><div><p> <tt>&lt;!-- include module2 --&gt;<br>&lt;iframe name="module2" src="module2.html" style="display:none"&gt;&lt;/iframe&gt;<br> <br>&lt;script type="text/javascript"&gt;<br>function my_func() {<br>&nbsp; &nbsp; alert("module1.my_func");<br>&nbsp; &nbsp; module2.my_func();<br>}<br>&lt;/script&gt;</tt></p></div> </blockquote><p>And in module2.html:</p><blockquote><div><p> <tt>&lt;script type="text/javascript"&gt;<br>function my_func() {<br>&nbsp; &nbsp; alert("module2.my_func");<br>}<br>&lt;/script&gt;</tt></p></div> </blockquote><p>To summarize: </p><ul> <li>iframe is used as the equivalent of an include statement</li> <li>The JS code resides in HTML files, which may have further iframes for including more code.</li> <li>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.</li> <li>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).</li> </ul> itub 2005-04-11T18:51:25+00:00 markup