exeunt's Journal http://use.perl.org/~exeunt/journal/ exeunt'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:12:40+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 exeunt's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~exeunt/journal/ "You need a bear"... (Overheard in #svn) http://use.perl.org/~exeunt/journal/19076?from=rss <p>&lt;rbb_laptop&gt; nevermind, I think I just found my problem.<br>&lt;rbb_laptop&gt; Grr, I've been staring at it for 30 minutes, and it hits me as soon as I post a question.<nobr> <wbr></nobr>:-(<br>&lt;fitz&gt; you need a bear.<br>&lt;fitz&gt; I used to have a stuffed bear in the office<br>&lt;fitz&gt; and before bugging another engineer,<br>&lt;fitz&gt; you had to "tell it to the bear"<br>&lt;fitz&gt; that is, describe your problem to the bear in detail<br>&lt;fitz&gt; 75% of the time, you figured it out while talking to the bear.<nobr> <wbr></nobr>:-)<br>&lt;fitz&gt; it really is amazing.<br>&lt;offby1&gt; that's one smart bear.</p> exeunt 2004-06-03T19:21:17+00:00 journal As seen in ant-users list... http://use.perl.org/~exeunt/journal/15711?from=rss <p>Ran across <a href="http://marc.theaimsgroup.com/?l=ant-user&amp;m=106859194212457&amp;w=2">this</a> on the ant-users list. Yet someone else trying to make another language to solve problems found in every other language out there. It cracks me up really. I debated replying and sending him parrots way. I'll wait to see what kind of thread this turns into first.</p> exeunt 2003-11-11T23:51:41+00:00 journal Songs in perl http://use.perl.org/~exeunt/journal/11666?from=rss <p>It's fun to make perl code to match songs.</p><p><code><br>$self-&gt;touch while($thought eq "you");<br></code></p> exeunt 2003-04-15T20:21:58+00:00 journal While the boss is away, the mice will play... http://use.perl.org/~exeunt/journal/11555?from=rss <p>Last year, while my boss made his annual trip back to the UK, we decided to leave him a decorate his office. A few thousand balloons later, his <a href="http://www.mydumbfriends.com/gallery/view_album.php?set_albumName=tonysoffice">office was full</a>. </p><p> This year, we were bound and determined out do ourselves. I think we have <a href="http://www.exeunt.com/office">succeeded</a>. Sure it may have cost more, but it was well worth it.</p> exeunt 2003-04-09T20:34:07+00:00 journal Divide bug? http://use.perl.org/~exeunt/journal/10993?from=rss <p>I just sent <a href="http://nntp.x.perl.org/group/perl.perl5.porters/72958">this post</a> to perl5-porters. This had me pulling my hair out as to what is causing it.</p><p>Below is a copy of the email I sent...</p><p>A co-worker of mine came across something strange that had me pulling my hair<br>out. Below is an example of the bug in action. Logically you would think that if<br>you divide 72.9 by 100, you get 0.729, so it should match the if statement. At<br>first we thought it was because we had 0.729000 as the condition, but that<br>doesn't matter. Also in the below code I have it test against 0.729 and 0.729000<br>without it resulting from a divide, and it passes.</p><p>I tested this against 5.005_03, 5.6.0, 5.6.1 and 5.8.0, all exhibit this<br>behaviour.</p><p><code><br>#!/usr/bin/perl<br>use warnings;<br>use strict;</code></p><p><code>my $test = 72.9;<br>my $divtest = $test/100;<br>my $condition = 0.729;<br>my $hardcode = 0.729000;<br>print "divtest =&gt; $divtest\ncondition =&gt; $condition\n";<br>if ($divtest == $condition) {<br> &nbsp; &nbsp; print "Should be true\n";<br>}<br>elsif ($divtest == $hardcode) {<br> &nbsp; &nbsp; print "This also should be true\n";<br>}<br>else {<br> &nbsp; &nbsp; print "What the?!!?\n";<br>}<br>if ($condition == $hardcode) {<br> &nbsp; &nbsp; print "Without divide it works\n";<br>}<br></code></p><p>UPDATE: Mark Jason Dominus set me straight, but as I just wrote back, I figured since their NV's are both 0.729 in the output from Devel:Peel, it would work... guess not, someone else replied directly to me and suggested using 'eq', but using that for numerical comparisons makes me feel a bit ill.</p> exeunt 2003-03-11T19:07:43+00:00 journal Helping open source, and Subversion... http://use.perl.org/~exeunt/journal/10820?from=rss While reading over the <a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=256">book</a> for Subversion, I ran across a few mistakes, and other odds and ends that needed to be patched. A few hours latter, they were in their repository. It <a href="http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-05/msg00930.html">always</a> <a href="http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-07/msg01316.html">gives</a> <a href="http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-11/msg00748.html">me</a> a <a href="http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-11/msg00821.html">good</a> <a href="http://archive.develooper.com/perl5-changes@perl.org/msg01816.html">feeling</a> <a href="http://archive.develooper.com/perl5-changes@perl.org/msg01815.html">to</a> help with open source projects.<br> <br> While looking over other parts of Subversion, it pains me not to see a Perl SWIG interface being worked on like their Python and Java ones. This goes way beyond my knowledge to even attempt. So, if anyone, with the right knowledge wants to feel helpful, there you go. exeunt 2003-02-27T16:15:17+00:00 journal Dual Monitors http://use.perl.org/~exeunt/journal/8064?from=rss <p>At work we have some extra 17 inch monitors laying around. We also have some older Diamond Stealth video cards that are not being used. So a few weeks ago I grabbed an extra monitor, an extra video card. After a few tries with BIOS settings, and driver issues, I got dual monitors going.</p><p>One of my only issues, is due to the lack of resolution on the second monitor. My primary card is 1280x1024x16, while the second one is limited to 1024x768x16. I would have to goto 256 color to allow the new monitor reach the same size, but that might get to me after a while.</p><p>During the last week, I had an extra computer on my desk, and another monitor. Luckily, I have the room. Now I am thinking of grabbing an extra video card, since I have one more free PCI slot, and going for triple monitors.</p><p>That might be a bit excessive though...</p> exeunt 2002-09-27T21:52:19+00:00 journal Upgrade my Pismo G3 400mhz to G4 500mhz? http://use.perl.org/~exeunt/journal/7974?from=rss <p>My Pismo has been working great for me ever since I bought it off a friend. The only problems I've ever had with it are the back flap covering the various ports broke off, it never fully closed anyway, and my covering for the IR lens fell out. I've also never successfully gotten the S-Video to work. These are just minor, to me at least, and it does it's job. Come to think of it, I've never heard the fan next to the processor on the left side ever turn on, unless it's really quiet, in that case, it's good. It never gets really hot, just slightly on bottom.</p><p>I've been thinking of upgrading the hard drive from 6 gigs to something more. I do have an external 80 gig firewire drive, but it's klunky, and requires a power cable. I could get a nice small firewire drive that pulls power from the firewire, and then no power cord needed. But for now, it's doing it's job.</p><p>It has 192 mb of ram, and it would be nice to max it to it's 512mb limit.</p><p>The only other thing I could do to upgrade is the processor. As a G3 400mhz, it does a decent job. Sometimes I wish it had just a bit more horsepower. Today I ran across a few links to <a href="http://www.powerlogix.com/">powerlogix</a> and a <a href="http://www.powerlogix.com/products2/bcg4pismo/index.html">service</a> they offer for upgrading it to a G4 500mhz. <a href="http://www.macnn.com/">macnn.com</a> has a <a href="http://reviews.macnn.com/review.php?id=17">reader review</a> on this process, and a few benchmarks. Looks pretty impressive.</p><p>The only "drawback" is you send them your laptop, they preform the upgrade, and send it back. Which can be a blessing too, so I don't have to tear my laptop apart, and leave it to someone who has done this before.</p><p>Have anyone here had experience with this? Or should I just save my money, and buy a <a href="http://forums.macrumors.com/showthread.php?threadid=11749">rumored</a> <a href="http://www.powerpage.org/story.lasso?newsID=9977">1.2ghz TiBook</a>. I would love to have that, but don't know if I want to spend the money, and save it for something else. Although my Pismo laptop has a pretty decent resell value, so Mac hardware does have a decent return on investment.</p><p>Of course, I would like a decent desktop, and keep my Pismo, and possibly upgrade it, and just get a nice Dual G4.<nobr> <wbr></nobr>:)</p> exeunt 2002-09-24T18:06:41+00:00 journal images.google.com oddities http://use.perl.org/~exeunt/journal/7953?from=rss <p>I always find it funny things I come across with some searches on <a href="http://images.google.com/">images.google.com</a>.</p><p>For example: <a href="http://images.google.com/images?q=perl&amp;ie=UTF-8&amp;oe=UTF-8&amp;hl=en">perl</a> on about page 8 (YMMV depending on "safe surf") I run across <a href="http://www.jkc.co.jp/images/.local/">this page</a>.</p><p>Also, see, perl can <a href="http://usuarios.lycos.es/asualam/perl/perl.jpg">do the dishes</a> for you, and apparently <a href="http://usuarios.lycos.es/asualam/perl/neoclor.jpg">more</a>!</p><p>Also, a co-worker found an old classic... <a href="http://www.wonton-slut.com/images/2000/camel_love.jpg">camel love!</a></p> exeunt 2002-09-23T22:15:51+00:00 journal Fun with BootX in Jaguar http://use.perl.org/~exeunt/journal/7935?from=rss <p>This weekend I finally picked up Jaguar. (Note to self: UFS installs suck)</p><p>So I was playing around with Jaguar all weekend, and like the new boot logo, instead of the happy mac.</p><p>Upon looking around, I find you can <a href="http://www.ryandesign.com/jagboot/instructions.html">change it</a> to whatever you want.</p><p>I call upon one of my graphic friends to do some work for me, since I don't have photoshop here at work, and will have to wait till I get home to play with it.</p><p><a href="http://www.exeunt.com/bootx/">Here</a> are the results. I will be trying to clean it up a bit, and playing with a few other ideas. Note: all these<nobr> <wbr></nobr>.raw files use the same color table as the original, and are untested, so please backup first.</p><p>Happy booting<nobr> <wbr></nobr>:)</p> exeunt 2002-09-23T17:03:12+00:00 journal Rebuild of a box http://use.perl.org/~exeunt/journal/7836?from=rss <p>My company wants to put an install of a bug/issue tracking software where our customers can enter their own bugs, and this can get filtered by our support team. It will also allow our customers to see if another customer have entered a bug.</p><p>We had a box with FreeBSD 4.4 installed on it running Bugzilla, which our RND team upstairs was using, so the idea was to install bugzilla (or RT, since I am starting to push for that) on a box that will be outside the firewall, at first, it was going to be a windows box, which I successfully changed their minds. Then they were going to have me install it on our DNS box, running linux, which I also successfully stopped, due to security reasons.</p><p>So now, I've taken the box running bugzilla, and moved that install of bugzilla over to another box, running our cvs server and other things, and have started rebuilding this FreeBSD box to 4.6.2.</p><p>For fun, I've renamed it from jedi to brimstone. We don't have an official naming scheme, and I chose jedi originally since it was a temporary box to play with. Almost all our other boxes are named after rocks or stones (which most happen to be streets near by too). Such as Ruby, sapphire, crystal, coral, etc. I chose brimstone, due to the hell/devil/bsd theme, and bugs are hell anyway<nobr> <wbr></nobr>;). I would have used amber, due to obvious reasons, but that was recently taken by our new e450 sun box.</p><p>Right now it is sitting there updating itself from the ports tree, after a quick cvsup of my current port tree.</p><p>Too bad RT is not a port on 4.6.2-RELEASE, same with perl 5.8. (Edit: just found<nobr> <wbr></nobr>/usr/ports/lang/perl5.8 after cvsup was done updating them)</p> exeunt 2002-09-19T16:09:17+00:00 journal SOAP::Lite issues http://use.perl.org/~exeunt/journal/7202?from=rss I don't know much about SOAP, other then it's on my list of things to play with in the future.<br><br>Recently I was asked to "test" a WebService with perl, it was pretty simple.<br><br>use SOAP::Lite;<br>print SOAP::Lite-&gt;service('http://webserver/Hello/Service1.asmx?WSDL')-&gt;Hello("test")<nobr>;<wbr></nobr> <br><br>It should print out "Hello test", but all it prints out is just "Hello".<br><br>Putting trace =&gt; qw(debug) into the use statement provides some nifty output.<br><br>(xml formatting done by me)<br><br>SOAP::Transport::HTTP::Client::send_receive: POST http://webserver/Hello/Service1.asmx<br>Accept: text/xml<br>Accept: multipart/*<br>Content-Length: 445<br>Content-Type: text/xml; charset=utf-8<br>SOAPAction: "http://webserver/webservices/Hello"<br><br>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"<br> &nbsp; SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"<br> &nbsp; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"<br> &nbsp; xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"<br> &nbsp; xmlns:xsd="http://www.w3.org/1999/XMLSchema"&gt;<br> &nbsp; &nbsp; &lt;SOAP-ENV:Body&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &lt;Hello xmlns=""&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;parameters&gt;Test&lt;/parameters&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &lt;/Hello&gt;<br> &nbsp; &nbsp; &lt;/SOAP-ENV:Body&gt;<br>&lt;/SOAP-ENV:Envelope&gt;<br><br>SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK<br>Cache-Control: private, max-age=0<br>Connection: close<br>Date: Tue, 20 Aug 2002 21:51:25 GMT<br>Server: Microsoft-IIS/5.0<br>Content-Length: 349<br>Content-Type: text/xml; charset=utf-8<br>Client-Date: Tue, 20 Aug 2002 21:50:05 GMT<br>Client-Response-Num: 1<br><br>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"<br> &nbsp; &nbsp; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br> &nbsp; &nbsp; xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;<br> &nbsp; &nbsp; &lt;soap:Body&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &lt;HelloResponse xmlns="http://webserver/webservices"&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;HelloResult&gt;Hello &lt;/HelloResult&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &lt;/HelloResponse&gt;<br> &nbsp; &nbsp; &lt;/soap:Body&gt;<br>&lt;/soap:Envelope&gt;<br><br>It appears it is missing the xmlns in the &lt;Hello&gt; tag, but nothing major.<br><br>From the actual WSDL file, the appropriate spots for SOAP requests (regular SOAP and GET ones)<br><br>&lt;message name="HelloSoapIn"&gt;<br> &nbsp; &nbsp; &lt;part name="parameters" element="s0:Hello"<nobr> <wbr></nobr>/&gt;<br>&lt;/message&gt;<br>&lt;message name="HelloHttpGetIn"&gt;<br> &nbsp; &nbsp; &lt;part name="sender" type="s:string"<nobr> <wbr></nobr>/&gt;<br>&lt;/message&gt;<br>&lt;message name="HelloHttpPostIn"&gt;<br> &nbsp; &nbsp; &lt;part name="sender" type="s:string"<nobr> <wbr></nobr>/&gt;<br>&lt;/message&gt;<br><br>And according to the "sample" ones, this is how it should be formatted for SOAP requests.<br><br>&lt;soap:Body&gt;<br> &nbsp; &nbsp; &lt;Hello xmlns="http://webserver/webservices"&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &lt;sender&gt;string&lt;/sender&gt;<br> &nbsp; &nbsp; &lt;/Hello&gt;<br>&lt;/soap:Body&gt;<br><br>To me it appears it contradicts itself, in the WSDL file, it wants &lt;parameters&gt;, which SOAP::Lite is doing.<br><br>On the other hand, according to this other page, it is wanting &lt;sender&gt;, which is for GET, not SOAP requests.<br><br>If anyone has any solutions, or pointers, let me know!<br><br>Of, and if it helps, the webservice is running off some<nobr> <wbr></nobr>.NET implimentation, I can get more details about any of this if needed. exeunt 2002-08-20T22:21:12+00:00 journal Error messages http://use.perl.org/~exeunt/journal/6602?from=rss <p>We just had one of our "3GL" text based systems outsourced to another company to make into a GUI. We just got one of our first bug reports on the new system. The client had this as the error message: "How the fuck did you get here?" It appears some programer thought it impossible to get this error message. It probably is along the same lines as <a href="http://www.perlmonks.org/index.pl?node_id=156818">this</a>.</p> exeunt 2002-07-24T16:16:39+00:00 journal We need perlrofl (or perlrotfl) to suppliment perllol. http://use.perl.org/~exeunt/journal/5822?from=rss <p>I came up with this idea while looking at various perldoc titles. We have a <tt>perllol</tt>, why not <tt>perlrofl</tt> or <tt>perlrotfl</tt>. There are quite a few others we could speculate about, such as <tt>perlrtfm</tt>, and <tt>perlstfu</tt>.</p><p>Here is my idea list for <tt>perlrofl</tt>/<tt>perlrotfl</tt>, some are tounge in cheek:</p><p>References, Objects, Files and Lists.<br>References, Objects, Taint, Files and Lists.<br>Referenced Object Things For List<br>References Of Tied Filehandle Lists<br>Regularly Obfuscated File List<br>Recursion On Funny Lists<br>Recursion On Those Funny Lists<br>Referencing Objects For Laughs<br>Referencing Objects Twice For Laughs<br>Reading Online For Learning<br>Reading Online Tutorials For Learning<br>Researching Online For Learning<br>Researching Online Tutorials For Learning<br>Radical Online Tutorials For Learning</p><p>Now if I could only decide on one... and be able to write it.</p> exeunt 2002-06-20T21:15:37+00:00 journal Portability http://use.perl.org/~exeunt/journal/4945?from=rss <p>As part of my job, I have to deal with some Java. Which isn't too bad, since I don't have to write it, I just have to make sure things compile, pass tests, etc.</p><p>We are getting ready to open source the framework our RnD team has been working on for the past year. There sure seems to be a lot of Java Frameworks out there. This one is specialized to the Aerospace Industry, so don't get too excited. I'll post more later, if someone is really dying to know more about it, and after we push the stuff out to sourceforge.</p><p>Back to the story at hand, which is portability. One of the main developers asks me to try running the JUnit tests on a unix server, since they do all their coding/testing/etc on windows machines. So I check out the latest version off our internal cvs server on the rnd linux server, and run junit tests. I get this nasty error from one of the unit tests about not being able to find a directory in the CLASSPATH to write a temp test file too.</p><p>My first impressions was that it was a permissions issue, so I chown a test directory to 777, and re-run it, same error. After I rechown the directory back to it's previous mode, I try running this off my windows machine. No error. Puzzled, I check the source code.</p><p>Here is a small section of the code:</p><p><code><br> &nbsp; &nbsp; String cp = System.getProperty("java.class.path");<br> &nbsp; &nbsp; StringTokenizer stknzr = new StringTokenizer(cp, ";");<br> &nbsp; &nbsp; while (stknzr.hasMoreTokens()) {<nobr> <wbr></nobr>...<br> &nbsp; &nbsp; }<br></code></p><p>I quickly insert a <tt>System.out.println("Classpath: " + cp);</tt> and get a copy of the classpath. I notice something funny, the classpath separator is a<nobr> <wbr></nobr><tt>:</tt>, not a<nobr> <wbr></nobr><tt>;</tt> as stated in the code. I run the same code, to output the classpath on windows, and the separator is<nobr> <wbr></nobr><tt>;</tt>. As a test, I change the<nobr> <wbr></nobr><tt>;</tt> to a<nobr> <wbr></nobr><tt>:</tt> real quick, re-run it, and it works on unix now (imagine that!).</p><p>Now to make it portable. Since only how to do simple hello world and other stupid tricks in java, I was thinking I'd have to go down an ugly path of knowing what system I am on, and setting some variable to <tt>pathSeperator</tt>, or leave it up the real java programmers. Just as a quick step, I check google, and find my answer: <tt>System.getProperty("path.separator")</tt>. Now instead of the <tt>";"</tt> it has the <tt>path.sperator</tt> value in there.</p><p>All is good now. Now to beat my developers into a portability mindset in the first place, and to find where else it won't work (<tt>find . -type f -name "*.java" | xargs grep '";"'</tt> turned up a few places they will have to re-visit).</p> exeunt 2002-05-15T20:21:56+00:00 journal CPAN PAUSE ID http://use.perl.org/~exeunt/journal/4069?from=rss <p>Woohoo, I got a CPAN Pause ID: <a href="http://nntp.perl.org/group/perl.modules/11085">LARRYSH</a>.</p><p>Now to unleash havoc on CPAN (j/k).</p><p>Still working on a few things before I acualy upload them.</p> exeunt 2002-04-09T21:44:59+00:00 journal Cousins http://use.perl.org/~exeunt/journal/3974?from=rss <p>I do admit, I have some very attractive cousins, but I would never <a href="http://www.cnn.com/2002/HEALTH/04/04/marrying.cousins.ap/index.html">marry</a> any of them.</p> exeunt 2002-04-04T20:41:16+00:00 journal Mac OS X slickness. http://use.perl.org/~exeunt/journal/3686?from=rss <p>Okay, my PowerBook G3 Pismo was in the middle of the 10.1 update, after a reinstall of OS 9, OS X. Unknown to me was my power supply had died, so it was running off battery. While at work, letting the update go, I looked over to see it in sleep mode, black screen, power light slowly fading in and out. I quickly try to diagnose the problem, and find out the fate of the power supply.</p><p>After a trip to Frys, and a new 3rd party power supply purchase (they were out of the stock apple yo-yo ones for my old PowerBook), I plug my laptop back in, and bring it out of sleep mode. Now I was expecting to find all kinds of errors spew forth, or a nice core dump, or the need to reinstall it all again. But no, it read '7 minutes left'. Which then turned into 47 hours left, and I saw the minutes fly off, and it took about 14 more minutes, and it was done.</p><p>So far, I have not experienced any problems after this, and I just have to take my hat off to Apple.</p> exeunt 2002-03-20T23:07:25+00:00 journal Learning about inheritance... http://use.perl.org/~exeunt/journal/3677?from=rss <p>Brought on by laziness, of having to get the web page into a variable, and then create the object for <tt>HTML::TokeParser</tt>, I knew there had to be a better way, while reading <a href="http://www.manning.com/Conway/index.html">Object Oriented Perl</a>, I decided to give it a try. Some of the items I want to change is to check for errors, and to allow files or actual html data passed to new(), not just a url, but that is just icing on the cake.</p><p><code><br>package HTML::TokeParser::URL;<br>use strict;<br>use warnings;</code></p><p><code>BEGIN {<br> &nbsp; &nbsp; use HTML::TokeParser;<br> &nbsp; &nbsp; use LWP::Simple qw(get);<br> &nbsp; &nbsp; our @ISA = qw(HTML::TokeParser);<br>}</code></p><p><code>sub new {<br> &nbsp; &nbsp; my $proto = shift;<br> &nbsp; &nbsp; my $class = ref($proto) || $proto;<br> &nbsp; &nbsp; my $page = get(shift);<br> &nbsp; &nbsp; my $self = HTML::TokeParser-&gt;new(\$page);<br> &nbsp; &nbsp; bless ($self, $class);<br> &nbsp; &nbsp; return $self;<br>}</code></p><p><code>1;<br></code><br><b>Updated:</b> Better (updated!) version of this on perlmonks <a href="http://www.perlmonks.org/index.pl?node_id=157614">here</a>.</p> exeunt 2002-03-20T17:50:50+00:00 journal Comments Enabled http://use.perl.org/~exeunt/journal/3621?from=rss <p>So I put a nice <a href="http://use.perl.org/~exeunt/journal/3580">entry</a> in my journal, asking for comments, but forgot to enable comments, and don't catch it till monday... ugh...</p><p>As I mentioned in an update to that entry, is there a way to have comments enabled by default?</p> exeunt 2002-03-18T19:31:02+00:00 journal What's the weirdest name you have given a variable name/sub? http://use.perl.org/~exeunt/journal/3580?from=rss <p><a href="http://use.perl.org/~gnat/journal/3574">This journal</a> made me think of typos in code, and then to reflect on werid variable names I've used.</p><p>Some are obvious, like <tt>$foo</tt>, <tt>$bar</tt>, <tt>$blah</tt>, <tt>$temp</tt>, <tt>$tmp</tt>.</p><p>Some of my favorites:<br><tt>%HugeAssHash</tt> (later renamed to <tt>%hah</tt>)<br><tt>&amp;kludge()</tt>, <tt>&amp;bugfix()</tt>, (the list could go on)</p><p>Anybody else have some to add to this list?</p><p><b>Updated:</b> Forgot to enable comments, I think that should be a prefernce somewhere to always have it on, unless I am missing it.</p> exeunt 2002-03-16T00:33:27+00:00 journal Ant http://use.perl.org/~exeunt/journal/2050?from=rss <p>As part of my current job as a Revision Control Specialist (my exact title!) in the Configuration Management/Deployment Services department, I get exposed to quite a few things. Some of them I hope never have to develop for, or learn. Such as <a href="http://www.compuware.com/products/uniface/">Uniface</a>.</p><p> One tool I've been put in charge of is maintaining their <a href="http://jakarta.apache.org/ant/">Ant</a> Build scripts. If you don't know what Ant is, I highly suggest you look it up. Even though it is all in Java, it has some merit. As their webpage says: <i>Apache Ant is a Java based build tool. In theory it is kind of like make without make's wrinkles.</i> </p><p>So far I have been really impressed with Ant. It even has the ability to run <a href="http://jakarta.apache.org/ant/manual/OptionalTasks/script.html">scripts</a> written in other languages, supported in java by <a href="http://oss.software.ibm.com/developerworks/opensource/bsf/">BSF</a>. I have not had a chance to try this yet, but plan on doing it (and of course using perl, since perl is supported by BSF). One idea I had as a project, since Ant Build Scripts are all XML based, is to write my own ant build script runner in Perl, since each "task" in Ant is written in Java, and is either a core task, optional task, or hand written/downloaded. Of course, make it more perlyish at the same time, with perl specific tasks. Of course, this will probably become one of my other half started, never finished projects.</p> exeunt 2002-01-10T21:14:23+00:00 journal how I found perl http://use.perl.org/~exeunt/journal/2023?from=rss <p> I guess I should actually write something in here. I have no idea what, so a little about me... </p><p> How I found Perl... </p><p> This is a funny story, and I hope I remember all the details. Around the end of 1997 I had this sudden desire to learn perl (at the suggestion of the system admin of my shell, and a friend). I quickly looked for a windows version, since I was not able to install linux (at least without my parents knowing it) on their computers. I did this so I could play around with it while not connected to the internet, since I could run perl off my shell. I found activestate's ActivePerl, and downloaded it, installed it, and ran perl.exe expecting some whiz bang gui to pop up to help me. To my dismay it did nothing, just sat there, after I waited a few minutes, I became discouraged, and put the thought aside of learning perl till when I had more time. </p><p> A few months go by i keep looking perl here and there. As I pick up more unix skills I figure out why just perl with out a script won't work, but don't have the time study it properly. Went through a few non computer related jobs. Then through a friend off IRC I started working remotely for him, doing data entry type stuff. In there, I had to modify a little perl code to do some quick calculations, if necessary (to do with price, and quantity ordered). It was suggested I learn perl in case I needed to do some fancy work, and just for general knowledge. </p><p> I went out and committed a mortal sin in the perl world, I bought Perl for Dummies. Before you judge me, it did help me get a quick start, and I quickly repented of my sin and bought myself a copy of Programming Perl and the Perl Cookbook. After the contract job for my friend ran out, I started playing with perl more heavily, being unemployed, and having lots of free time. Being the role-player I am, I decided to write a dice roller. With my new found skills, I began to get fancy with my dice roller, and kept adding features, like color (using Term::AnsiColor). After playing with a command line version of this little dice roller, I decided to look into a GUI version. That is when I found TK, more specifically, perl/tk. I then preceded to write a slick gui dice roller. Looking back at the code it was ugly, but mine. I am too ashamed to admit is mine, and if you look enough, you might find a copy, if you know where to look. I keep telling myself I am going to go back and re-write it. But have I? Not yet. Maybe next week. </p><p> After having mastered most of the basics of perl, and being hounded by my parents to find a job, I got one through a friend, doing what I found exciting, writing perl code! Ever since then I have done most of my scripting in perl. I'll admit, I've dabbled in python, java, and php, but always find myself longing for the simplicity of perl. </p><p> There are lots of more details I can add, but I'll save those for another day... </p> exeunt 2002-01-10T00:52:03+00:00 journal