Mr. Muskrat's Journal http://use.perl.org/~Mr.+Muskrat/journal/ Mr. Muskrat'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:08:09+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 Mr. Muskrat's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~Mr.+Muskrat/journal/ Google Wave Invites http://use.perl.org/~Mr.+Muskrat/journal/40002?from=rss I have 25 Google Wave invitations. If anyone would like one, please contact me at mmusgrove@cpan.org. Mr. Muskrat 2009-12-10T18:09:12+00:00 journal [Win32::]KeyState http://use.perl.org/~Mr.+Muskrat/journal/39982?from=rss <p>Way back on July 9, 2003 I uploaded Win32::KeyState to CPAN but it was indexed as KeyState. No biggie.</p><p>It has not received any love since that day.</p><p>I know of one person other than myself who ever used it: Johan Lodin.</p><p>Is anyone still using it? Or has everyone moved on to Win32::GuiTest and/or Win32::Console?</p><p>I would like to either turn over the module to someone or remove it from CPAN.</p><p>Either follow up with a comment here or send me an email at mmusgrove@cpan.org. (The email address listed in the documentation is no longer valid.)</p><p>Thank you.</p> Mr. Muskrat 2009-12-05T19:03:31+00:00 journal Win32::mIRC http://use.perl.org/~Mr.+Muskrat/journal/39981?from=rss <p>I doubt that anyone is still using Win32::mIRC.</p><p>I doubt that anyone other than me ever used this module and I want to remove it from CPAN. (I do not care if it ends up in BackPAN or not.)</p><p>If anyone <b>is</b> still using Win32::mIRC, please send an email to mmusgrove@cpan.org and not the email address listed in the module documentation.</p><p>Thank you.</p> Mr. Muskrat 2009-12-05T18:56:43+00:00 journal Web Developer's Newest Support Tool? http://use.perl.org/~Mr.+Muskrat/journal/39211?from=rss This afternoon a coworker sent me an email that said, 'This looks really handy for debugging, when you ask the client what browser they're using and they say "Vista": <a href="http://supportdetails.com/">http://supportdetails.com/</a>' Mr. Muskrat 2009-07-02T18:51:28+00:00 journal DBD::Oracle's Persistent OCI Environment http://use.perl.org/~Mr.+Muskrat/journal/39080?from=rss <p>Background:<br> We have been writing all of our security related information to<nobr> <wbr></nobr>/var/log/secure. We typically use two database handles in our applications: one for the operator logged in and one for administrative purposes. The operator has just enough privileges to do what he or she needs to do in the application. We recently upgraded to Red Hat Enterprise Linux 5.3 64-bit, Oracle 11 Standard 64-bit, DBI 1.607 and DBD::Oracle 1.22 and everything was happy.</p><p>About a week ago we started putting that info into the database as well and everything was running wonderfully. That is until someone mistyped his or her password -- then we started seeing odd behaviors. It started out looking like a return was failing to return and instead crashing the app. One person was working through our code looking for something that had changed and added a cluck before the return in an attempt to shed some light on the situation. The app mysteriously made it further along but started crashing with a OCIHandleAlloc failure.</p><p>I found some information on the web that indicated that we might be falling back on 32-bit libraries. Our LD_LIBRARY_PATH environment variable turned out to indeed be pointing to 32-bit libraries so I fixed it. The problem persisted.</p><p>I saw that were newer versions of DBI (1.608) and DBD::Oracle (1.23). The DBI install went off without a problem. DBD::Oracle 1.23 was failing LOB tests (a known issue without a resolution) so I kept it at 1.22. The problem persisted.</p><p>Next I enabled trace level 1. I logged in using a valid username but an invalid password. That is when I saw that, while we were using two database handles, DBI/DBD::Oracle was refusing to accept the good admin connection as good after the bad connection attempt was made.</p><p>Then another coworker pointed out that by default, DBD::Oracle reuses the OCI environment for subsequent connections. Usually this is a good thing but it was causing us problems. Fortunately, the solution was as simple as adding <tt>ora_envph =&gt; 0</tt> to our connection options. I also removed that cluck and it remained fixed.</p> Mr. Muskrat 2009-06-05T15:36:57+00:00 journal My Other Blog http://use.perl.org/~Mr.+Muskrat/journal/39020?from=rss <p>Many are leaving use.perl.org but I am not (yet any way). I do not post very often so the interface, while annoying at times, is not enough to drive me mad.</p><p>Instead I am just letting everyone know that I am working towards a Bachelor of Science in Photography through the <a href="http://aionline.edu/">Art Institute of Pittsburgh - Online Division</a>. I started a new blog a week or so ago: <a href="http://onlinestudentofphotography.blogspot.com/">Online Student of Photography</a>. "Wow, what a boring name for a blog." I know but it was the best I could come up with at the time.</p><p>I hate writing assignments with a passion but for some reason blogging is therapeutic.</p> Mr. Muskrat 2009-05-22T11:52:43+00:00 journal Tips For Job Applicants http://use.perl.org/~Mr.+Muskrat/journal/37174?from=rss <p>We are also in the process of finding and hiring a few people. Here are some of the tips that come to mind for potential applicants (and I am sure that I am forgetting some).</p><p>When filling out our pre-screening questions:</p><ol> <li>If you do not know the answer, resist the urge to post the perldoc listing verbatim.</li><li>When answering the questions concerning the code snippets and you do not know the answer, feel free to run it before you take that guess.</li><li>When you include source code as a part of an answer, ensure that it compiles and runs.</li></ol><p>When doing a phone screening or in-house interview:</p><ol> <li>It is perfectly acceptable to be nervous. We have been in your shoes and know how it feels.</li><li>Be prepared to talk about anything that you list on your resume (duties, responsibilies, applications, systems, operating systems, known languages, technologies, etc).</li><li>If you do not know the answer to a question then say so. Trying to make something up on the spot, while amusing for us, does not give you bonus points.</li></ol><p>When doing a phone screening:</p><ol> <li>Do not schedule the phone screening for a time when you will be in the office at your current job.</li><li>If you get flustered, then let us know you need a moment to collect yourself. You do not need to terminate the interviewing process altogether. (Hanging up on us only leaves us wondering what happened.)</li><li>If you need to reschedule once we have started the call then we will reschedule it.</li><li>Pause from time to time to give us a chance to talk to you.</li></ol><p>When doing an in-house interview:</p><ol> <li>You will get points deducted for wearing jeans and t-shirt instead of business casual attire.</li><li>When addressing someone, make eye contact.</li></ol> Mr. Muskrat 2008-08-13T20:08:10+00:00 journal Profiling CGI Scripts with Devel::NYTProf http://use.perl.org/~Mr.+Muskrat/journal/37134?from=rss <p>If you have not seen <a href="http://search.cpan.org/~timb/Devel-NYTProf/">Devel::NYTProf</a> yet then you must be living under a rock. I installed it on one of our development servers at work today (after watching the <a href="http://timbunce.blip.tv/file/1130150/">OSCON presentation</a>. I have not had a chance to use it much but I am already deeply in love!</p><p>So I was reading through the docs and thinking "it works with mod_perl but what about normal CGI scripts?" Nothing that I have read indicated that it could not be done so I edited my Apache config to add the following (and restarted Apache of course):</p><blockquote><div><p> <tt>SetEnv PERL5OPT -d:NYTProf<br>SetEnv NYTPROF=file=/tmp/nytprof.out</tt></p></div> </blockquote><p>I then accessed one of our CGI scripts and went to<nobr> <wbr></nobr>/tmp to create the HTML. However nytprof.out was not there. In its place was nytprof.out=!</p><p>So I changed the second line to be (and restarted Apache):</p><blockquote><div><p> <tt>SetEnv NYTPROF=file=/tmp/nytprof.out:</tt></p></div> </blockquote><p>Yep, that second line really ends with a colon. </p><p>I hit the same CGI script and looked in<nobr> <wbr></nobr>/tmp. Yep, nytprof.out was there. Yay! (But I get "Unknown option:" in my error log.)</p><p>I think that I need to file a bug report (but have not yet because I do not know if it is an Apache bug, a Devel::NYTProf bug or simply user error). What do you think?</p><p>My next step was to run nytprofhtml.</p><blockquote><div><p> <tt>[mmusgrove@somebox tmp]$ nytprofhtml<br>Generating report...<br>Unable to open '/long/path/to/cgi-bin/security/Parser.yp' for reading: No such file or directory. Try running<nobr> <wbr></nobr>/opt/misc/bin/nytprofhtml in the same directory as you ran Devel::NYTProf, or ensure @INC is correct.</tt></p></div> </blockquote><p>I look in<nobr> <wbr></nobr>/long/path/to/cgi-bin/security and sure enough there is not a Parser.yp file. The good news is that (most of) the HTML files were generated. *drool* They are absolutely gorgeous!</p><p>I pull up the index.html file in Firefox and scroll down a bit. What do I see but:</p><blockquote><div><p> <tt>230&nbsp; &nbsp; 0.00431&nbsp; &nbsp; 0.00002&nbsp; &nbsp; line . block . sub&nbsp; &nbsp;<nobr> <wbr></nobr>/long/path/to/cgi-bin/security/Parser.yp</tt></p></div> </blockquote><p>I click on "line" and everything shown is from Template::Grammar.</p><blockquote><div><p> <tt>28&nbsp; &nbsp; 1&nbsp; &nbsp; 1&nbsp; &nbsp; 0.00033&nbsp; &nbsp; 0.00033&nbsp; &nbsp; Template::Grammar::&nbsp; &nbsp; __ANON__[Parser.yp:72]</tt></p></div> </blockquote><p>I do not particularly care that I cannot drop down into the guts of Parser.yp. Yet I still cannot help but wonder if it is a bug in Devel::NYTProf or simply a by-product of how I got the profiling done... Anyone have any ideas?</p> Mr. Muskrat 2008-08-08T19:25:25+00:00 journal CPANTS Update http://use.perl.org/~Mr.+Muskrat/journal/36631?from=rss <p> <a href="http://szabgab.com/blog/2008/06/1212827982.html">Gabor Szabo requested comments on several new CPANTS metrics.</a> Short answer: it is not enough. </p><p>What benefit does having Debian metrics add for anyone who doesn't use Debian (or a Debian-based OS)? None, I suspect.</p><p>When will we see Red Hat specific metrics added? <b>distributed_in_rhel</b> has a nice ring to it. And you can't forget about Slackware; <b>got_slack</b>? Microsoft users will cry out for <b>bill_gates_approved</b>. FreeBSD needs some love too, <b>sold_your_soul_to_the_daemon</b>.</p><p>The proposed additions cry out for even more! We want, nay! We NEED additions for every OS imaginable! When can we expect to see those?</p> Mr. Muskrat 2008-06-09T17:12:21+00:00 journal Rakudo Perl http://use.perl.org/~Mr.+Muskrat/journal/36293?from=rss <p>Last night <a href="http://use.perl.org/~Mr.+Muskrat/journal/36206">Patrick Michaud presented "Rakudo Perl"</a> to the D/FW Perl Mongers. It sounds like a great time to start working with Perl 6. The compiler is far enough along that I can start doing baby programming in it. I can gradually start using more and more features as they become available. That sounds like a nice way to grow into the language.</p><p>I was surprised and extremely pleased by the amount of time that he spent talking about the Parrot Compiler Toolkit (PCT) and how to make your own compiler on Parrot. First, he showed us how to quickly make a very basic calculator with it. Then he had to show us the LOLCODE compiler that Will Coleda and Simon Cozens put together in about 4 hours! I wish I had use for PCT as it sounds great.</p><p>If you want to check it out, here are Patrick's <a href="http://www.pmichaud.com/2008/pres/dfwpm-rakudo/slides/start.html">Rakudo Perl slides</a>.</p> Mr. Muskrat 2008-04-30T21:59:04+00:00 journal This is (mostly) my Perl Blog http://use.perl.org/~Mr.+Muskrat/journal/36281?from=rss <p>I have a tendency to write about stuff I'm working on whether it's directly Perl related or not. We use a bunch of stuff that all connects in some really interesting ways. This means that I'll post about Perl, Oracle, HTML, CSS, JavaScript, Flash, Red Hat Enterprise Linux (and sometimes even Outlook since we run Windows on our laptops).</p><p>I'll occasionally post about something going on at home since I haven't started a non-Perl blog yet.</p> Mr. Muskrat 2008-04-29T21:20:32+00:00 journal Patrick Michaud Presenting "Rakudo Perl" http://use.perl.org/~Mr.+Muskrat/journal/36206?from=rss <p>The <a href="http://dfw.pm.org/">Dallas/Ft. Worth Perl Mongers</a> are pleased to announce that we will be holding a technical meeting at <a href="http://dfw.pm.org/news.html">7pm on April 29th</a> at <a href="http://www.nerdbooks.com/">NerdBooks</a> in Richardson. Patrick Michaud will be presenting Rakudo Perl.</p><p>Abstract:<br> &#8220;Rakudo Perl&#8221; is the new name for the Perl 6 compiler targeting the Parrot virtual machine. Building Rakudo has required development of a number of tools and methodologies (as well as revisions to the Perl 6 language specification itself), and things are progressing nicely.</p><p>This talk will report on the overall status and implementation of the Rakudo Perl compiler, outline what is working (and what is not working) in Rakudo, and demonstrate how to get started writing Perl 6 programs. The talk will also cover the design of the compiler itself, focusing on the overall architecture, the structure of the Perl 6 test suite, and provide specific details that will enable others to become involved and to directly contribute to the remaining work of building Rakudo. The talk will end with a &#8220;road map&#8221; to completion of a production Perl 6 compiler on Parrot.</p> Mr. Muskrat 2008-04-21T16:52:57+00:00 groups Flash Socket Policy Changes - Solution! http://use.perl.org/~Mr.+Muskrat/journal/36193?from=rss <a href="http://use.perl.org/~Mr.+Muskrat/journal/36183">Yesterday</a> I posted how I was fighting with the Flash socket policy changes. Today I found a solution. At some point I had reverted back to using Adobe's example xinetd socket server written in Perl. The problem was that the example wrote log information to STDERR and xinetd redirects STDOUT and STDERR to the socket. I was sending logging info mixed in with the policy file so of course it was invalid! Mr. Muskrat 2008-04-18T15:13:32+00:00 journal Flash Socket Policy Changes http://use.perl.org/~Mr.+Muskrat/journal/36183?from=rss <p>At work we have this web based app that uses Flash to open a socket and pass along any data it receives to the JavaScript. Everything was working well until Flash rolled out 9,0,124,0. Now our app cannot make the socket connection (to the same domain that hosts the SWF) because we don't have a policy file. So I read all the articles they provided and followed their directions to get one set up (with a process set up on port 843 to hand out the policy file).</p><p>So I try out our web based app only to see this show up:</p><blockquote><div><p> <tt>Web Based App::securityErrorHandler: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: http://someserver/flash.swf cannot load data from someserver:12345."]</tt></p></div> </blockquote><p>So I installed the debug version of Flash Player and configured my mm.cfg with 'PolicyFileLog=1' so that Flash will create a log with the profile information in it (profilelog.txt ). What do I see in profilelog.txt?</p><blockquote><div><p> <tt>OK: Root-level SWF loaded: http://someserver/flash.swf<br>OK: Searching for &lt;allow-access-from&gt; in policy files to authorize data loading from resource at xmlsocket://someserver:12345 by requestor from http://someserver/flash.swf<br>Warning: [strict] Ignoring policy file at xmlsocket://someserver:843 due to incorrect syntax.&nbsp; See http://www.adobe.com/go/strict_policy_files to fix this problem.</tt></p></div> </blockquote><p>I reread all of the articles and go through the steps of creating the policy file only this time I use their example file:</p><blockquote><div><p> <tt>&lt;?xml version="1.0"?&gt;<br>&lt;!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd"&gt;<br> <br>&lt;!-- Policy file for xmlsocket://socks.example.com --&gt;<br>&lt;cross-domain-policy&gt;<br> <br>&nbsp; &nbsp;&lt;!-- This is a master socket policy file --&gt;<br>&nbsp; &nbsp;&lt;!-- No other socket policies on the host will be permitted --&gt;<br>&nbsp; &nbsp;&lt;site-control permitted-cross-domain-policies="master-only"/&gt;<br> <br>&nbsp; &nbsp;&lt;!-- Instead of setting to-ports="*", administrator's can use ranges and commas --&gt;<br>&nbsp; &nbsp;&lt;!-- This will allow access to ports 123, 456, 457 and 458 --&gt;<br>&nbsp; &nbsp;&lt;allow-access-from domain="swf.example.com" to-ports="123,456-458"<nobr> <wbr></nobr>/&gt;<br> <br>&lt;/cross-domain-policy&gt;</tt></p></div> </blockquote><p>I hit the web app again. I was expecting it to be accepted but still throw the securityErrorHandler. Instead I received the same exact error! Their example policy file is invalid! I then tried to remove the comments and blank lines but that was still invalid.</p><p>Next I tried using one that I found on the net:</p><blockquote><div><p> <tt>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>&lt;cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFile.xsd"<nobr>&gt;<wbr></nobr> <br>&nbsp; &nbsp; &nbsp; &nbsp; &lt;allow-access-from domain="someserver" to-ports="12345"/&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp; &lt;site-control permitted-cross-domain-policies="master-only"/&gt;<br>&lt;/cross-domain-policy&gt;</tt></p></div> </blockquote><p>Of course it too was invalid.</p><p>I tried every possible combination that I can think of and nothing worked. So I made a call to Adobe tech support. Once I had the guy understanding what was happening he had me pull up the app and look at the profilelog.txt. The only thing is that it worked this time. Yeah, that's right folks, apparently calling tech support will fix it automatically. (Even if that were true, it would be totally impractical.)</p><p>After I hung up, I SCPed the file to another server and tried to get it working there. No luck. I received the invalid syntax error every time in profilelog.txt. I've tried everything but simply couldn't get it working on the second server.</p><p>So my boss tells me that we'll just make sure that we ship a version of the Flash Player that does work. Great! I'll just back out all of my changes, uninstall Flash 9,0,124,0 and install the old Flash Player. Except that I can't get any old version of the Flash Player to install in IE. It'll only install 9,0,124,0!</p><p>Finally I decided that I had better reinstate the files to the development server since it looks like we do have to get this thing working. Guess what? I can't get it to work on the original server again.</p><p>*sigh*</p> Mr. Muskrat 2008-04-17T23:41:31+00:00 journal Red Hat Certifications http://use.perl.org/~Mr.+Muskrat/journal/36063?from=rss <p>I have spent all week at the Red Hat office in Dallas taking <a href="https://www.redhat.com/courses/rh131_red_hat_linux_system_administration/">RH131 Red Hat Linux System Administration</a>.</p><p>Today I took the exam and it felt easy. It felt so easy that I really thought that I had aced the exam. Unfortunately, I didn't. I passed with an 87 though so now I'm a <a href="https://www.redhat.com/certification/rhct/">Red Hat Certified Technician (RHCT)</a>. It's a pity that they don't tell you which parts you messed up on.</p><p>My next step will be to take <a href="https://www.redhat.com/courses/rh253_red_hat_linux_networking_and_security_administration/">RH253 Red Hat Linux Networking and Security Administration</a> and the <a href="https://www.redhat.com/certification/rhce/"> Red Hat Certified Engineer (RHCE)</a> exam. My goal is to be a <a href="https://www.redhat.com/certification/rhcss/"> Red Hat Certified Security Specialist (RHCSS)</a> (although if work will continue to foot the bill after that then I'll complete all of the classes and exams to be a <a href="https://www.redhat.com/certification/rhca/"> Red Hat Certified Architect (RHCA)</a>).</p> Mr. Muskrat 2008-04-04T23:31:20+00:00 journal Outlook Needs Better Rules http://use.perl.org/~Mr.+Muskrat/journal/35945?from=rss <p>At $work we use Outlook with an Exchange server for our email. Recently I've taken on system administration tasks for my group. Any email sent to root on our servers goes to me.</p><p>One of the servers is running OpenNMS (apparently it's not configured correctly). OpenNMS keeps sending email to me with subjects like 'Notice #XXXX: node some.node.domain.local down' and 'RESOLVED: Notice #XXXX: node some.node.domain.local down'. Some days I get 15 or 20 notices (plus the corresponding resolved notices). Other days I get 50 - 75 notices (plus the resolved). (More often than not, the downtime is super short and I get two notices and two resolves for the same system in one minute).</p><p>Until I can finish configuring OpenNMS (so that it's not so darn sensitive) I'd like to set up Outlook to automatically mark the notice and corresponding resolve as read. Outlook's rules don't allow for wildcards or capturing or anything that resembles a 21st century feature. I've done some Excel macros in the past but I've never needed to muck with VBA in Outlook so I really don't know where to start (other than what I've found doing a Google for it). I also downloaded a few sample scripts for doing Outlook inbox/message manipulation in Perl.</p><p>Are there any Outlook gurus reading this? Do you have any suggestions?</p> Mr. Muskrat 2008-03-20T15:03:08+00:00 journal Ubuntu, Automation and Strawberry Perl http://use.perl.org/~Mr.+Muskrat/journal/35143?from=rss <p>Two or three weeks back I made a big leap. I switched from Windows XP Pro to Ubuntu as my primary desktop OS. World of Warcraft and the Cosmos addon updater were my big hold ups but since I managed to get both of them running under Wine I just couldn't resist.</p><p>Shortly after making the switch I decided to get a script written that would automatically check my Gmail account for CPAN Uploads and write them to disk as scripts (a batch file for Windows and a bash script for linux) that could be executed at a later time. I used an IMAP module that eludes me at the moment and the whole thing took ten minutes (including a few test runs). Previously I had one that ran on Windows but the Gmail module I was using fails ever since Gmail started rolling out the 2.0 changes so my CPAN Uploads folder had a few hundred uploads in it. I ran the script and it completed in a flash.</p><p>I dropped the Windows batch file in a Samba share and went to the bedroom to run the script on my laptop that's running Windows Vista. Everything was going smoothly so I left. A few hours later I go back to check on the progress and I find that the module installations had started failing at some point. I scrolled back and found the culprit. When I wrote the IMAP script I forgot to skip the Perl-Dist uploads and it dutifully tried to install Perl-Dist-VanillaPerl which hosed my configurations. D'oh!</p><p>Since it's Windows Vista system I don't want to go to the hassle of installing Strawberry Perl 5.8.8 since there is so much manual stuff to do to fix MinGW after the fact. So I can't wait for the next release of Strawberry Perl which I hope will fix the MinGW issues with Vista.</p> Mr. Muskrat 2007-12-18T23:34:11+00:00 journal Hebrew Spam? http://use.perl.org/~Mr.+Muskrat/journal/34815?from=rss I have a message in my inbox from someone named "Hellie" (from a<nobr> <wbr></nobr>.il address). The subject and all content is in Hebrew. Since I can't read it I don't know for sure that it is spam. Mr. Muskrat 2007-11-02T01:16:47+00:00 journal Massive Upgrades in Progress http://use.perl.org/~Mr.+Muskrat/journal/34752?from=rss <p>At work I've been moving forward with upgrading various things that we rely upon: OS, DB, etc.</p><p>I created a custom distro of Red Hat Enterprise Linux 5 64-bit to replace the previous custom distro of Red Hat Enterprise Linux 4 Update 3 32-bit. (Custom meaning set of custom kickstart scripts and some extra packages slipstreamed in with the default ones.)</p><p>I've been working with one of our contractors to move from Oracle 10.1.0.3 32-bit to Oracle 10.2.0.3 64-bit (and only install the bits and pieces we are actually using).</p><p>This week I installed my custom RHEL5 into a VM, updated our installation scripts to use the new version of Oracle, installed Oracle in the VM, installed all of the Perl modules that we use from CPAN and installed our product over top of it all.</p><p>I tried to start Apache and it failed. It turns out that I had to tweak the httpd.conf that we ship since we previously used Apache 2.0.52 and RHEL5 ships with Apache 2.2.3. Once I got past that I found that I had permission issues with $ENV{ORACLE_HOME}/lib. I fixed that only to find that I still have problems to overcome.</p><p> <b>ERROR OCIEnvNlsCreate. Check ORACLE_HOME env var, NLS settings, permissions, etc.</b> </p><p>It's not $ENV{ORACLE_HOME}, $ENV{ORACLE_SID} or the NLS stuff. It's definitely file and/or directory permissions but the problem is that I don't know which files and/or directories... yet.</p><p>How do I know it's permissions? I cheated. I did a 'chmod -R a+rx<nobr> <wbr></nobr>/u01<nobr> <wbr></nobr>/u02' and all of a sudden I could use our app just fine.</p><p>I'm doing a new install from scratch so that I can play around as a normal user and see what strace tells me when I run various scripts.</p> Mr. Muskrat 2007-10-25T17:34:29+00:00 journal Wii http://use.perl.org/~Mr.+Muskrat/journal/34340?from=rss <p>I recently bought a Wii. The kids have been begging for one since they came out. I've wanted one since they came too. My wife sort of wanted one but not as much as me and the kids.</p><p>We picked up Wii Play (it's only $10 more than a remote and comes with one), Super Paper Mario and Metroid Prime 3: Corruption as well as an extra nunchuk.</p><p>Wii Sports is fun for the entire family. It looks like Bowling is the #1 pick though (and the kids can beat me at it).</p><p>Wii Play is a mixed bag. There are games that some of us like that the others don't. I'm not sure why but I really like Cow Racing.</p><p>Super Paper Mario is another one that the entire family enjoys. The controls are mostly the same as previous Mario games (if you swap 1 for A and 2 for B). I really like the mix of 2D and 3D environments. I never played Paper Mario but the downside of SPM for me is the amount of talking that goes on in the game. (It's reminiscent of the FF or Zelda games.)</p> Mr. Muskrat 2007-09-04T17:33:57+00:00 journal Some Days I Feel Like I Know Nothing About Oracle http://use.perl.org/~Mr.+Muskrat/journal/34260?from=rss <p>Today is another one of those days.</p><p>I'm doing a query against a table using a primary key and a check if two of the other columns are not the same.</p><p>SELECT <i>column_list</i> FROM <i>table_name</i> WHERE <i>pk_column</i> = <i>some_var</i> AND <i>column_x</i> != <i>column_y</i>;</p><p>One of the columns can be null. Apparently I have never tried to do this with Oracle until now.</p><p>Initially I expected that NULL is not equal to some non-NULL value in the same way that an undef is not equal some defined value. However, I know why Oracle does this (it's in the ANSI standard but no one else that I know of does it this way).</p> Mr. Muskrat 2007-08-29T20:04:39+00:00 journal Oracle Quotes http://use.perl.org/~Mr.+Muskrat/journal/34210?from=rss Oracle throws some odd errors if you mistakenly use the wrong kind of quotes.<blockquote><div><p> <tt>SQL&gt; CREATE OR REPLACE FUNCTION test (p_in IN VARCHAR2)<br>&nbsp; 2&nbsp; RETURN NUMBER<br>&nbsp; 3&nbsp; AS<br>&nbsp; 4&nbsp; BEGIN<br>&nbsp; 5&nbsp; &nbsp; IF p_in = "" THEN<br>&nbsp; 6&nbsp; &nbsp; &nbsp; RETURN 0;<br>&nbsp; 7&nbsp; &nbsp; END IF;<br>&nbsp; 8&nbsp; END test;<br>&nbsp; 9&nbsp;<nobr> <wbr></nobr>/<br>CREATE OR REPLACE FUNCTION test (p_in IN VARCHAR2)<br>*<br>ERROR at line 1:<br>ORA-00604: error occurred at recursive SQL level 1<br>ORA-01400: cannot insert NULL into ("SYS"."OBJ$"."NAME")</tt></p></div> </blockquote><p>Say what? That error message does anything but scream "you used the wrong quoting character".</p><blockquote><div><p> <tt>SQL&gt; CREATE OR REPLACE FUNCTION test (p_in IN VARCHAR2)<br>&nbsp; 2&nbsp; RETURN NUMBER<br>&nbsp; 3&nbsp; AS<br>&nbsp; 4&nbsp; BEGIN<br>&nbsp; 5&nbsp; &nbsp; IF p_in = '' THEN<br>&nbsp; 6&nbsp; &nbsp; &nbsp; RETURN 0;<br>&nbsp; 7&nbsp; &nbsp; END IF;<br>&nbsp; 8&nbsp; END test;<br>&nbsp; 9&nbsp;<nobr> <wbr></nobr>/<br> <br>Function created.</tt></p></div> </blockquote> Mr. Muskrat 2007-08-24T20:57:42+00:00 journal YAPC::NA::2007 Day 2 http://use.perl.org/~Mr.+Muskrat/journal/33724?from=rss <p>I was torn on which talks to attend. I sat in on Todd Olson's "Automating Workflow" and Steven Lembark's "Developing a Test Harness" but I was still half asleep through them both so I didn't get much out of them (sorry guys).</p><p>cog's "How NOT To Write a Perl Resume and How NOT To Behave in an Interview" was pretty much what I expected.<nobr> <wbr></nobr>:) The man has a great sense of humor and has no (apparent) trouble speaking to groups of people.</p><p>I missed a few talks because I decided to check out the job fair. I'm not in the market for a new job but I wanted to see some of the other companies that are using Perl. I ended having some interesting conversations with a few folks who were hanging out in the area.</p><p>I made it back for Luke Cross' "Agile Testing with Selenium" but I was a bit late. (Sorry Luke!) I don't use Selenium yet but I have been watching it for a while and would love to start using it at work.</p><p>After lunch, I caught Perrin's "Care and Feeding of Large Web Applications". We don't have a large web app but much of what he discussed we already do. We deploy "builds" which consist of a CD or DVD containing our complete installation set up. We use the CPAN shell to pick which modules we want to install, install them and then load them into our RCS. We have an upgrade script for the existing software and will adding an upgrade script for the future releases. We use branches more than most places but our RCS makes doing so a breeze (and merges are fairly simple too). We're working on improving our test procedures. All in all he validated that we were on the right track even if we haven't perfected it yet.</p><p>I'm glad I stayed in the Cougar Den for Casey West's "MochiKit: Good Tools for the Web Developer". I've been meaning to try it and MooTools (the other kit he mentioned a few times). I think that MochiKit is going to overkill but MooTools might be a good fit. I'll have to read the docs and play with them both to find out for sure. Once again Casey had great examples and plenty of humor to keep the talk flowing smoothly. He's one of my favorite speakers.</p><p>Todd Wade's "WAAAC" talk wasn't exactly what I was expecting but it made me want to look at CGI::Application and Catalyst again. He made them both look very easy to use.</p><p>I bailed out of the talks early because I was exhausted. I went back to the dorm and rested briefly before getting ready for the YAPC dinner and TPF auction.</p><p>We got to the Hilton a little early and hung out talking to people as they came in. Uri, Wade, Yaakov and company are a hoot to watch when they get together. It's like the 3 Stooges, Laurel and Hardy &amp; Abbot and Costello all rolled together.</p><p>The dinner was nice. They had a mess of Texas BBQ with all the trimmings. They had IRC up on the big screen and it seemed to be the focal point of much of the conversations.</p><p>Uri conned, I mean, convinced my wife to help him with the auction by handing the items to him. She said that she had a good time. I can't imagine how since she's just a computer user not a geek but Uri is a funny guy. I suppose his antics kept her amused, I know it did me.<nobr> <wbr></nobr>:)</p><p>After the dinner we decided to see who had shown up to the Beer BOF. They set it up in the basement of the dorm. Quite a few people showed up for it. It was amusing... Everyone was congregated in one corner of the room (packed in more like it) and the rest of the room was empty. We weren't there very long before an area coordinator for the dorm came down and busted it up. He said that alcohol wasn't allowed in the common areas and that normally he'd have called the campus police but we were guests so he'd let us off with a warning if we packed up and went to our rooms. Everyone packed up and moved the party upstairs to a some adjoined rooms. Mary and I didn't stay long after that because it was very cramped and extremely loud.</p><p>We headed outside to enjoy the nice evening and met up with Jesse Shy. We stood around talking with him for probably two hours. He's got a ton of "war stories" from his days in the military and he tells them well.</p> Mr. Muskrat 2007-07-06T17:36:04+00:00 journal Galveston http://use.perl.org/~Mr.+Muskrat/journal/33631?from=rss <p> <b>Day 1</b> </p><p>My wife and I left YAPC a few hours early (I'll finish my YAPC posts later in the week BTW) and we drove down to Galveston. We got down here about 4pm and just started driving around to get a feel for the place. We had made a reservation for the night before leaving Houston so we were in no hurry to find a motel. Galveston is much bigger than I imagined it would be. It is very touristy but has the small town feel at the same time.</p><p>We stopped at a place called Casey's on Seawall Blvd for dinner. It has a large fiberglass or plastic shrimp on a pole out front. I had some sort of seafood platter that ended up being more blackened than grilled like it should have been. It wasn't bad; just not what I had been expecting. Mary had Fettuccine Alfredo with a tomato basil sauce and grilled chicken. She had the waiter, Kyle R, take it back and redo it since her chicken was also blackened instead of grilled like it should have been but more so than my seafood. She also asked for the sauce to be on the side since they had put way too much the first time. A short time later he brought the food out to her and it looked awesome. When we received the check we saw that he had removed her meal from the check. I try to tip well normally but let's just say that Kyle got more than he would have ordinarily because he treated her so well.</p><p>After dinner we checked into our room and put our stuff away. We decided to go down to the beach so we put on our swim suits and flip flops and walked back up to Seawall Blvd (like 1 block away from the motel). We strolled over to a place called Tortuga's and had a drink on the patio before hitting the beach. We walked in the shallow water while chatting about things. As we were going to turn around and head back Mary asked if we could go for a swim. I agreed provided that we didn't stay in the water too long since it was already starting to get dark. The water felt great; it was very warm and the waves kept lapping up against us. The seaweed was a bit annoying though. After we got out of the water we walked over to the 61st Street Pier and sat up on the observation deck and just enjoyed the ocean breeze and the sound of the waves crashing around us.</p><p> <b>Day 2</b> </p><p>Today we slept in until just before 11 am. We weren't feeling very adventurous so we went to Waffle House for coffee and a late breakfast. We stopped in to Wal-Mart afterwards to pick up more ice and soda before heading to the beach again. This time we drove out a bit and stopped at Beach Pocket Park #2 which had a pavilion with restrooms, showers and picnic tables. The beach had been cleaned recently which meant a strip of seaweed about 6 feet wide (instead of 18 to 24 feet wide that it would have been otherwise) running the entire length of the shore. The wind was cool which was a nice accompaniment to the heat rising from the sand. We walked in the water for 45 minutes to an hour before deciding to go out into the waves. We went out one hundred fifty feet or so from the shore and the water was waist deep until a wave hit us. Some of the waves were small and subdued which was nice. Some of the waves were quite large and would crash over our heads which was a bit annoying. Salt water doesn't taste very good and it has a tendency to burn my eyes. At least our sinuses are clear now! We stayed at the beach for a few hours and ate a light lunch before leaving.</p><p>We checked into a different motel this afternoon (this one was slightly cheaper) and took a 2 hour nap. When we woke up we headed out to dinner at a place called Fish Tales. I had a seafood platter that consisted of fried catfish, fried calamari (the rings and the tentacles, yummy!), fried shrimp, fried oysters, french fries, a (crab?) stuffed shrimp and two shrimp poppers. I call them poppers because I really don't know what they were called. The shrimp were stuffed with cheese and jalape&#241;os before being wrapped in bacon and fried to a pleasant crisp. There was so much food that I couldn't eat it all. Mary had a 8oz center cut sirloin fillet cooked well done with a loaded baked potato. The service was prompt and friendly. The prices are a bit high but I'd still recommend it.</p><p>We came back to the room after dinner because Mary wanted to soak in the tub for a while. We are about to head back out to Seawall Blvd to walk and check out some of the souvenir shops.</p> Mr. Muskrat 2007-06-29T02:14:50+00:00 journal YAPC::NA::2007 Day 1 http://use.perl.org/~Mr.+Muskrat/journal/33610?from=rss <p>The dorm room feels like a freezer. The beds remind me of the ones we had in basic training (plastic over stiff springs with a thin layer of padding); they produce a loud squeak every time you move in the slightest bit. The doors have a tendency to slam if you let them close on their own which leads to being woken up at all times during the night.</p><p>Cog's intro to YAPC talk ("How to get the most out of YAPC") was very entertaining. I don't remember a whole lot about the talks done by Larry Wall and Richard Dice. Perhaps because the Houston room was also a freezer. If it hadn't been for the coffee I don't think I could have made it til lunch.</p><p>I joined my wife in the Oberholtzer cafeteria for lunch. $6.50 for all you can eat is a pretty good deal.</p><p>I must say that I really enjoyed the afternoon talks. Josh McAdams and Barbie were entertaining while being educational. Michael Peters while educational was less entertaining.</p><p>Casey West spent the better part of the morning sprucing up his slides. He was humorous and energetic. The slides really did look nice. His examples were easy to understand.</p><p>Quite a few us met in the UC games room from 8:45 - 11:45 pm. Mary and I bowled the entire time. We're both terrible bowlers but we really enjoyed ourselves. Brad Smithart and Kiran Kumar (both from DFW.pm) joined us after our first two games. Patrick Michaud joined us for the final game. Mary and I bowled five games in all and I am sore from head to toe today.</p> Mr. Muskrat 2007-06-26T19:15:19+00:00 journal YAPC::NA::2007 Day 0 http://use.perl.org/~Mr.+Muskrat/journal/33596?from=rss Mary and I have checked in to our room at Taub Hall. We are about to hop in the shower and get dressed for dinner. I'm in the mood for steak so we'll try to find the Steak &amp; Ale at 12250 Gulf Freeway (south on 45 from the Uni). After that, maybe find a place to sing some karaoke.<nobr> <wbr></nobr>;) Mr. Muskrat 2007-06-25T00:23:59+00:00 journal Create a bootable DVD image with mkisofs http://use.perl.org/~Mr.+Muskrat/journal/33350?from=rss <p>I have a tendency to forget all of the options that I want to use when making a bootable DVD image with mkisofs so I'll post it here.</p><p>Set $LABEL to requested volume label. Set $ISO to the full path to the requested ISO. Then run the following command from the directory containing the DVD's file system.</p><blockquote><div><p> <tt>mkisofs -b isolinux/isolinux.bin -c isolinux/boot.cat -hide-rr-moved \<br>&nbsp; -no-emul-boot -boot-load-size 4 -boot-info-table -R&nbsp; -J&nbsp; -T&nbsp; -v \<br>&nbsp; -V $LABEL -A $LABEL -o $ISO<nobr> <wbr></nobr>.</tt></p></div> </blockquote> Mr. Muskrat 2007-05-25T16:09:56+00:00 journal Thinking Back on Six Flags Over Texas http://use.perl.org/~Mr.+Muskrat/journal/33160?from=rss <p>Continuing the discussion that was started at <a href="http://use.perl.org/comments.pl?sid=35366&amp;op=&amp;threshold=0&amp;commentsort=0&amp;mode=thread&amp;cid=54702">Spindletop</a>.</p><p>Spinnaker was pretty fun if dizzying. I only got sick on it once in my life and that was when I rode it after eating a Pink Thing.</p><p>LaSalle's Riverboat Expedition was good fun as a kid even after I knew it was all fake.</p><p>I was kind of glad when they took out the Caddo War Canoes. They used to wear me out.</p><p>Another ride I used to like was Big Bend (a big, red roller coaster). It was located over what is now Aquaman (formerly Splashwater Falls) and the Wildcatter (formerly the Cliff Hanger).</p><p>Thinking back even further to when I was really young. Spee-Lunker's Cave scared me.<nobr> <wbr></nobr>:D Oh and I can remember the big, orange, smoking volcano in the Mexico or Spain sections. I believe it was called Ferrocarril Fiesta Train (if Wikipedia is right).</p> Mr. Muskrat 2007-04-30T20:52:30+00:00 journal PL/SQL Comments http://use.perl.org/~Mr.+Muskrat/journal/32976?from=rss <p>I like to put comments in my files containing PL/SQL statements and it recently bit me. Perhaps you have already been bitten by it or knew of this behavior already. SQL*Plus' parser has what I consider a bug. Comments (single and multiline) cannot follow a command terminator (semicolon or slash).</p><blockquote><div><p> <tt>SQL&gt; -- good<br>SQL&gt;&nbsp; &nbsp; &nbsp; -- good<br>SQL&gt; select * from dual -- good<br>&nbsp; 2&nbsp;<nobr> <wbr></nobr>/<br> <br>D<br>-<br>X<br> <br>SQL&gt; select * from dual -- good<br>&nbsp; 2&nbsp;<nobr> <wbr></nobr>;<br> <br>D<br>-<br>X<br> <br>SQL&gt; select * -- good<br>&nbsp; 2&nbsp; from -- good<br>&nbsp; 3&nbsp; dual -- good<br>&nbsp; 4&nbsp;<nobr> <wbr></nobr>;<br> <br>D<br>-<br>X<br> <br>SQL&gt; select * -- good<br>&nbsp; 2&nbsp; from -- good<br>&nbsp; 3&nbsp; dual -- good<br>&nbsp; 4&nbsp;<nobr> <wbr></nobr>/<br> <br>D<br>-<br>X<br> <br>SQL&gt; select * from dual; -- bad<br>&nbsp; 2&nbsp;<nobr> <wbr></nobr>/<br>select * from dual; -- bad<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *<br>ERROR at line 1:<br>ORA-00911: invalid character<br> <br>SQL&gt; select * from dual<br>&nbsp; 2&nbsp; / -- bad<br>&nbsp; 3&nbsp;<nobr> <wbr></nobr>/<br>/ -- bad<br>*<br>ERROR at line 2:<br>ORA-00933: SQL command not properly ended<br> <br>SQL&gt;<nobr> <wbr></nobr>/* good */<br>SQL&gt; select * from dual<nobr> <wbr></nobr>/* good */<br>&nbsp; 2&nbsp;<nobr> <wbr></nobr>/<br> <br>D<br>-<br>X<br> <br>SQL&gt; select * from dual<nobr> <wbr></nobr>/* good */<br>&nbsp; 2&nbsp;<nobr> <wbr></nobr>;<br> <br>D<br>-<br>X<br> <br>SQL&gt; select *<nobr> <wbr></nobr>/* good */<br>&nbsp; 2&nbsp; from<nobr> <wbr></nobr>/* good */<br>&nbsp; 3&nbsp; dual<nobr> <wbr></nobr>/* good */<br>&nbsp; 4&nbsp;<nobr> <wbr></nobr>;<br> <br>D<br>-<br>X<br> <br>SQL&gt; select *<nobr> <wbr></nobr>/* good */<br>&nbsp; 2&nbsp; from<nobr> <wbr></nobr>/* good */<br>&nbsp; 3&nbsp; dual<nobr> <wbr></nobr>/* good */<br>&nbsp; 4&nbsp;<nobr> <wbr></nobr>/<br> <br>D<br>-<br>X<br> <br>SQL&gt; select * from dual;<nobr> <wbr></nobr>/* also bad */<br>&nbsp; 2&nbsp;<nobr> <wbr></nobr>/<br>select * from dual;<nobr> <wbr></nobr>/* also bad */<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *<br>ERROR at line 1:<br>ORA-00911: invalid character<br> <br>SQL&gt; select * from dual<br>&nbsp; 2&nbsp; /<nobr> <wbr></nobr>/* also bad */<br>&nbsp; 3&nbsp;<nobr> <wbr></nobr>/<br>/<nobr> <wbr></nobr>/* also bad */<br>*<br>ERROR at line 2:<br>ORA-00933: SQL command not properly ended</tt></p></div> </blockquote> Mr. Muskrat 2007-04-12T20:15:06+00:00 journal Problems with use.perl.org? http://use.perl.org/~Mr.+Muskrat/journal/32968?from=rss I am unable to edit my preferences or reply to posts. I get an error page:<blockquote><div><p>We are apparently having a temporary problem with our database (or maybe our random formkey generator). Please try again later.</p><p>Chances are, you're behind a firewall or proxy, or clicked the Back button to accidentally reuse a form. Please try again. If the problem persists, and all other options have been tried, contact the site administrator.</p></div> </blockquote><p>Is there a problem with use.perl.org or is at my end?</p><p>Update: It's working now!</p> Mr. Muskrat 2007-04-11T19:55:04+00:00 journal