<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-3275938</id><updated>2010-02-07T02:33:41.398-05:00</updated><title type='text'>More Boom In The Room</title><subtitle type='html'>This is my personal weblog, usually with stuff about music and other geeky things.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/-/Perl'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/search/label/Perl'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mark Gardner</name><uri>http://www.blogger.com/profile/17501111570130872463</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3275938.post-4718685266175064743</id><published>2008-07-10T11:44:00.000-04:00</published><updated>2008-07-14T02:40:33.125-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>Batch-checking that a set of Perl modules compile</title><content type='html'>&lt;tt&gt;cd &lt;var&gt;module-dir&lt;/var&gt;; find . -name '*.pm' -exec perl -c {} \; 2&gt;&amp;1 | fgrep -v 'syntax OK'&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-4718685266175064743?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/4718685266175064743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/4718685266175064743'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2008/07/batch-checking-that-set-of-perl-modules.html' title='Batch-checking that a set of Perl modules compile'/><author><name>Mark Gardner</name><uri>http://www.blogger.com/profile/17501111570130872463</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08417800270238090448'/></author></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-3935960891952602540</id><published>2008-06-16T17:57:00.005-04:00</published><updated>2008-07-14T02:40:33.126-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='howto'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>HOWTO fix Perl IO::Uncompress::RawInflate errors in CPAN shell</title><content type='html'>I've run into &lt;a href="http://community.activestate.com/forum-topic/trouble-installing-packages-rawinflate-broken"&gt;this&lt;/a&gt; &lt;a href="http://www.nntp.perl.org/group/perl.cpan.discuss/2008/06/msg464.html"&gt;problem&lt;/a&gt; &lt;a href="http://www.perlmonks.org/?node_id=689510"&gt;repeatedly&lt;/a&gt; on my work PC.  Unfortunately the solutions I've seen seem to be specific to Linux distributions, and I'm using Cygwin on Windows XP.  So here's my (hopefully cross-platform) solution: manually download the &lt;a href="http://search.cpan.org/~pmqs/IO-Compress-Zlib-2.011/"&gt;IO::Compress::Zlib&lt;/a&gt; tarball from &lt;acronym title="Comprehensive Perl Archive Network"&gt;CPAN&lt;/acronym&gt;, then build and install it manually &lt;a href="http://search.cpan.org/src/PMQS/IO-Compress-Zlib-2.011/README"&gt;as per the README file&lt;/a&gt;.  The CPAN shell should now be able to unpack things again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-3935960891952602540?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/3935960891952602540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/3935960891952602540'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2008/06/howto-fix-perl-iouncompressrawinflate.html' title='HOWTO fix Perl IO::Uncompress::RawInflate errors in CPAN shell'/><author><name>Mark Gardner</name><uri>http://www.blogger.com/profile/17501111570130872463</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08417800270238090448'/></author></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-1620930959332500873</id><published>2008-04-11T15:55:00.002-04:00</published><updated>2008-07-14T02:40:33.126-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Under-appreciated Perl functions: map, grep and exists</title><content type='html'>I've recently taken more direct ownership of a big Perl application at work, and in the process of adding a new feature noticed a lot of this type of looping code:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# loop 1&lt;br /&gt;my %foo_types = ();&lt;br /&gt;foreach my $entry_data_ref (@entry_data) {&lt;br /&gt;    $foo_types{ $entry_data_ref-&gt;[19] } = $entry_data_ref-&gt;[20];&lt;br /&gt;}&lt;br /&gt;my $foo_types_regex = '(' . join('|', keys %foo_types) . ')';&lt;br /&gt;&lt;br /&gt;# loop 2&lt;br /&gt;foreach my $data_ref (@data) {&lt;br /&gt;    my $id = $data_ref-&gt;[0];&lt;br /&gt;    push(@ids_to_disable, $id) if $type_cd =~ m/^$foo_types_regex$/;&lt;br /&gt;    my $type_cd = $data_ref-&gt;[21];&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;I managed to simplify it down to this:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# loop 1&lt;br /&gt;my %foo_types = map { $_-&gt;[19] =&gt; $_-&gt;[20] } @entry_data;&lt;br /&gt;&lt;br /&gt;# loop 2&lt;br /&gt;my @ids_to_disable = map $_-&gt;[0], grep exists $foo_types{ $_-&gt;[21] }, @data;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;See the difference? Both loops are concerned with generating one list from another -- the first transforms a list into a hash, the second uses the keys of that hash to determine the contents of another list. This is what &lt;code&gt;map&lt;/code&gt; (and its cousin, &lt;code&gt;grep&lt;/code&gt;) are built for. The &lt;code&gt;foreach&lt;/code&gt; loop in the original hides the intent of the code, and it's likely slower as well since &lt;code&gt;map&lt;/code&gt; knows how many elements it needs to process and can preallocate space on the list it returns.&lt;br /&gt;&lt;br /&gt;The original &lt;code&gt;loop 1&lt;/code&gt; also populated a string with hash keys to use as a regular expression later in order to find out what entries to get out of &lt;code&gt;@data&lt;/code&gt; in &lt;code&gt;loop 2&lt;/code&gt;. But again, we have a much more appropriate function for this: &lt;code&gt;exists&lt;/code&gt;. Checking for a hash hit is near-instantaneous compared to working through a long regular expression, and again it makes the code smaller and easier to understand and debug.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;map&lt;/code&gt; and &lt;code&gt;grep&lt;/code&gt; come from the more functional-programming side of Perl, and they seem to be very underused and under-appreciated by people used to more traditional procedural languages like C and Java.  It's unfortunate, because it leads to much more bloated code that takes longer to debug, and doesn't use the language's full capabilities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-1620930959332500873?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/1620930959332500873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3275938&amp;postID=1620930959332500873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/1620930959332500873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/1620930959332500873'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2008/04/under-appreciated-perl-functions-map.html' title='Under-appreciated Perl functions: map, grep and exists'/><author><name>Mark Gardner</name><uri>http://www.blogger.com/profile/17501111570130872463</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08417800270238090448'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-7597197232254809206</id><published>2007-12-13T10:59:00.000-05:00</published><updated>2008-04-11T16:53:18.320-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='Mac'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>I'm the new Perl XML::Parser MacPorts maintainer</title><content type='html'>Not really a big deal, but I like &lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt; and I use this module a lot.  Mainly this will be a matter of monitoring &lt;a href="http://search.cpan.org/dist/XML-Parser/" title="XML::Parser on CPAN"&gt;&lt;acronym title="the Comprehensive Perl Archive Network"&gt;CPAN&lt;/acronym&gt;&lt;/a&gt; for new releases.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-7597197232254809206?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://trac.macports.org/projects/macports/changeset/32016' title='I&apos;m the new Perl XML::Parser MacPorts maintainer'/><link rel='replies' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/7597197232254809206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3275938&amp;postID=7597197232254809206' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/7597197232254809206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/7597197232254809206'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2007/12/im-new-perl-xmlparser-macports.php' title='I&apos;m the new Perl XML::Parser MacPorts maintainer'/><author><name>Mark Gardner</name><uri>http://www.blogger.com/profile/17501111570130872463</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08417800270238090448'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-116249338095017514</id><published>2006-11-02T13:49:00.001-05:00</published><updated>2008-07-14T02:40:33.128-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>Visual Basic for the Web</title><content type='html'>&lt;a href="http://www.tbray.org/ongoing/When/200x/2006/10/31/Zend-PHP-Conference"&gt;According to Tim Bray&lt;/a&gt;, &lt;a href="http://andigutmans.blogspot.com/"&gt;Andi Gutmans&lt;/a&gt; said at the recent &lt;A href="http://www.zendcon.com/"&gt;Zend/PHP Conference&lt;/a&gt; that "the right way to think about &lt;a href="http://php.net/"&gt;PHP&lt;/a&gt; is as &lt;a href"http://msdn2.microsoft.com/en-us/vbasic/"&gt;Visual Basic&lt;/a&gt; for the Web."&lt;br /&gt;&lt;br /&gt;My new job is at an avowed "PHP shop", even though the position was &lt;a href="http://jobs.perl.org/job/4730"&gt;advertised on a Perl-oriented job board&lt;/a&gt;.  A lot of the technical portion of my interview was spent pointing out that I had skills in both -- one of my future co-workers even admitted to me that he was biased towards me as a "Perl guy" instead of just as a programmer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-116249338095017514?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.tbray.org/ongoing/When/200x/2006/10/31/Zend-PHP-Conference' title='Visual Basic for the Web'/><link rel='replies' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/116249338095017514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3275938&amp;postID=116249338095017514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/116249338095017514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/116249338095017514'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2006/11/visual-basic-for-web.php' title='Visual Basic for the Web'/><author><name>Mark Gardner</name><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-115858319225880967</id><published>2006-09-18T08:39:00.000-04:00</published><updated>2008-07-14T02:40:33.128-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>Coverity Study Ranks LAMP Code Quality</title><content type='html'>Interesting excerpt to me, since Perl is my weapon of choice:&lt;br /&gt;&lt;blockquote&gt;"Chelf was surprised, however, by the performance of the Perl language.&lt;p&gt;"Of the LAMP stack, Perl had the best defect density well passed standard deviation and better than the average, Chelf said.&lt;p&gt;Perl had a defect density of only 0.186. In comparison Python had a defect density of 0.372 and PHP was actually above both the baseline and LAMP averages at 0.474." &lt;cite&gt;("&lt;a href="http://www.internetnews.com/stats/article.php/3589361"&gt;Coverity Study Ranks LAMP Code Quality&lt;/a&gt;", Sean Michael Kerner, internetnews.com)&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="tags"&gt;Tags:&lt;ul&gt;&lt;li&gt;&lt;a href="http://del.icio.us/mjg/linux" rel="tag"&gt;linux&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/apache" rel="tag"&gt;apache&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/mysql" rel="tag"&gt;mysql&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/perl" rel="tag"&gt;perl&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/python" rel="tag"&gt;python&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/php" rel="tag"&gt;php&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/security" rel="tag"&gt;security&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/lamp" rel="tag"&gt;lamp&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/dhs" rel="tag"&gt;dhs&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/coverity" rel="tag"&gt;coverity&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/code" rel="tag"&gt;code&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/defects" rel="tag"&gt;defects&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-115858319225880967?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.internetnews.com/stats/article.php/3589361' title='Coverity Study Ranks LAMP Code Quality'/><link rel='replies' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/115858319225880967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3275938&amp;postID=115858319225880967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/115858319225880967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/115858319225880967'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2006/09/coverity-study-ranks-lamp-code-quality.php' title='Coverity Study Ranks LAMP Code Quality'/><author><name>Mark Gardner</name><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-115455447728379435</id><published>2006-08-02T17:17:00.000-04:00</published><updated>2008-07-14T02:40:33.129-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>$Philadelphia-&gt;isa("YAPC::NA") ?</title><content type='html'>Geoff Avery of &lt;a href="http://phl.pm.org/"&gt;phl.pm&lt;/a&gt; (the Philadelphia Perl mongers) has &lt;a href="http://news.perlfoundation.org/2006/08/yapcna2007_philadelphia_bid.html"&gt;submitted&lt;/a&gt; our fair city to be the site for next year's &lt;a href="http://www.yapc.org/"&gt;Yet Another Perl Conference&lt;/a&gt;.  We should find out by September 1 whether Philly (OK, Camden) made it.&lt;br /&gt;&lt;br /&gt;I was at the first Perl Conference (now &lt;a href="http://conferences.oreillynet.com/oscon/"&gt;OSCON&lt;/a&gt;) in San Jose, and haven't been to many other professional conferences after that.  It'd be nice to have one so close.&lt;br /&gt;&lt;div class="tags"&gt;Tags:&lt;ul&gt;&lt;li&gt;&lt;a href="http://del.icio.us/mjg/perl" rel="tag"&gt;perl&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/philadelphia" rel="tag"&gt;philadelphia&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/yapc" rel="tag"&gt;yapc&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/geek" rel="tag"&gt;geek&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://del.icio.us/mjg/conference" rel="tag"&gt;conference&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-115455447728379435?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://abe.pm.org/wiki/index.cgi?YAPCPhiladelphiaSubmission' title='$Philadelphia-&gt;isa(&quot;YAPC::NA&quot;) ?'/><link rel='replies' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/115455447728379435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3275938&amp;postID=115455447728379435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/115455447728379435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/115455447728379435'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2006/08/philadelphia-isayapcna.php' title='$Philadelphia-&gt;isa(&quot;YAPC::NA&quot;) ?'/><author><name>Mark Gardner</name><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-115142288274085430</id><published>2006-06-27T11:02:00.002-04:00</published><updated>2008-07-14T02:39:13.562-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>The other "P"s in OPAL</title><content type='html'>So Oracle has recently been embracing the non-database parts of the &lt;acronym title="Linux, Apache, MySQL, Perl/PHP/Python"&gt;LAMP&lt;/acronym&gt; web development stack and given it the name &lt;acronym title="Oracle, PHP, Apache, Linux"&gt;OPAL&lt;/acronym&gt;. They've got a &lt;a href="http://www.oracle.com/technology/tech/php/index.html"&gt;PHP Developer Center&lt;/a&gt;, a n &lt;a href="http://www.oracle.com/technology/tech/php/zendcore/index.html"&gt;integrated Zend PHP engine&lt;/a&gt;, even a &lt;a href="http://blogs.oracle.com/opal/"&gt;blog&lt;/a&gt; and &lt;a href="http://forums.oracle.com/forums/forum.jspa?forumID=178"&gt;discussion forum&lt;/a&gt; on PHP.&lt;br /&gt;&lt;br /&gt;So where's the love for the other, more general-purpose languages that are part of the web development stack?  Why is &lt;a href="http://search.cpan.org/dist/DBD-Oracle/"&gt;DBD::Oracle&lt;/a&gt; so freakin' hard to set up?  Why has &lt;a href="http://www.zope.org/Members/matt/dco2"&gt;DCOracle2&lt;/a&gt; languished umaintained for four years?&lt;br /&gt;&lt;br /&gt;I have nothing against &lt;a href="http://php.net/"&gt;PHP&lt;/a&gt;, and have even done some work in it (including this site).  But &lt;a href="http://www.perl.com/"&gt;Perl&lt;/a&gt; is my weapon of choice, and I'm sure other developers have theirs.  Oracle would do well not to alienate us by making us struggle with their software.  They're &lt;a href="http://weblog.infoworld.com/openresource/archives/2006/06/mysql_the_datab.html"&gt;losing market share to MySQL&lt;/a&gt; when it comes to web and rapid application development -- my bread-and-butter.&lt;br /&gt;&lt;br /&gt;I like Oracle in most other respects.  Their &lt;a href="http://www.oracle.com/technology/products/database/xe/index.html"&gt;Express Edition&lt;/a&gt; database is a godsend for doing quickie work in preparation for moving it to enterprise-sized big iron.  &lt;a href="http://www.oracle.com/technology/products/database/application_express/index.html"&gt;Application Express&lt;/a&gt; is drop-dead simple for the majority of &lt;acronym title="create, report, update, delete"&gt;CRUD&lt;/acronym&gt;-like web apps.  I just wish they would go all in and show better support for us non-PHP developers out there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-115142288274085430?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogs.oracle.com/opal/' title='The other &quot;P&quot;s in OPAL'/><link rel='replies' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/115142288274085430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3275938&amp;postID=115142288274085430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/115142288274085430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/115142288274085430'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2006/06/other-ps-in-opal.php' title='The other &quot;P&quot;s in OPAL'/><author><name>Mark Gardner</name><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-115031149206907287</id><published>2006-06-14T14:18:00.000-04:00</published><updated>2008-07-14T02:40:33.130-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>Back in the saddle</title><content type='html'>For the past week I've been working on a project that finally gets me back into real web development (as opposed to the &lt;span lang="fr" style="font-style: italic"&gt;faux&lt;/span&gt;-web dev I've done for the past several months with &lt;a href="http://www.oracle.com/technology/products/database/application_express/index.html"&gt;Oracle APEX&lt;/a&gt; and doctoring up a hairball &lt;a href="http://win32.perl.org/"&gt;Windows Perl&lt;/a&gt; script.) New weapons in my arsenal this time around are &lt;a href="http://www.cgi-app.org/"&gt;CGI::Application&lt;/a&gt;, &lt;a href="http://dbix-class.shadowcatsystems.co.uk/"&gt;DBIx::Class&lt;/a&gt;, and &lt;a href="http://www.template-toolkit.org/"&gt;Template Toolkit&lt;/a&gt;, which together give me a fairly good set of loosely-coupled &lt;acronym title="model-view-controller"&gt;MVC&lt;/acronym&gt;-oriented tools.&lt;br /&gt;&lt;br /&gt;I tried &lt;a href="http://www.jifty.org/"&gt;Jifty&lt;/a&gt;, but the lack of Oracle support was a deal-breaker for me. (Sent in a &lt;a href="http://svn.jifty.org/index.cgi/jifty/view/Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Oracle.pm?rev=1137"&gt;bug fix&lt;/a&gt; to help that effort along, though.) Also tried &lt;a href="http://www.catalystframework.org/"&gt;Catalyst&lt;/a&gt;, but couldn't get my head wrapped around it. Maybe I'm just too stupid for these full-stack kits, and will need a couple go-arounds with the more lightweight CGI::App before making another attempt.&lt;br /&gt;&lt;br /&gt;The smallness of CGI::App is definitely a draw, though. The full-stack MVC toolkits impose a pretty strict application structure -- so much so that they use &lt;a href="http://www.jifty.org/view/GettingStarted"&gt;helper&lt;/a&gt; &lt;a href="&gt;http://search.cpan.org/~agrundma/Catalyst-5.6902/lib/Catalyst/Manual/Intro.pod#Setup"&gt;scripts&lt;/a&gt; to set it up for you. (&lt;a href="http://www.rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt; obviously popularized this trend.) CGI::App lets me put together a quickie module hidden behind a small instance script, and then grow it as needed. Heck, I could see myself rewriting this site (dude, the band's been dead for two years, move on) with a thin CGI::App shell for the blog, and then adding bits as the mood (and free time) strikes.&lt;br /&gt;&lt;br /&gt;So, yeah. After another several month drought, this is my second post in as many days, and it's another geekfest. Oh well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-115031149206907287?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/115031149206907287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3275938&amp;postID=115031149206907287' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/115031149206907287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/115031149206907287'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2006/06/back-in-saddle.php' title='Back in the saddle'/><author><name>Mark Gardner</name><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-114350189151513535</id><published>2006-03-27T18:24:00.000-05:00</published><updated>2008-07-14T02:40:33.131-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>Yay, my first Perl Monks post</title><content type='html'>Ever wanted a quickie example on &lt;a href="http://perlmonks.org/?node_id=539578"&gt;Microsoft WMI and Win32::OLE&lt;/a&gt;? Yeah, me neither. :-/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-114350189151513535?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://perlmonks.org/?node_id=539578' title='Yay, my first Perl Monks post'/><link rel='replies' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/114350189151513535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3275938&amp;postID=114350189151513535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/114350189151513535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/114350189151513535'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2006/03/yay-my-first-perl-monks-post.php' title='Yay, my first Perl Monks post'/><author><name>Mark Gardner</name><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3275938.post-114193730124095470</id><published>2006-03-09T15:27:00.000-05:00</published><updated>2008-04-11T17:04:16.755-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='geek'/><title type='text'>CGI dump script</title><content type='html'>For my own reference, a &lt;a href="http://www.perl.com/"&gt;Perl&lt;/a&gt; CGI script to dump out received parameters, &lt;a href="http://search.cpan.org/dist/perl/pod/perlsec.pod"&gt;taint mode&lt;/a&gt; status, and Perl's internal configuration. In order to run taint scripts on &lt;a href="http://www.microsoft.com/windowsxp/evaluation/features/iis.mspx"&gt;Microsoft IIS (version 5.1 on Windows XP Pro SP2)&lt;/a&gt; with &lt;a href="http://www.activestate.com/Products/ActivePerl/"&gt;ActivePerl&lt;/a&gt; I had to create a mapping (&lt;kbd&gt;Default Web Site Properties&lt;/kbd&gt; &amp;rarr; &lt;kbd&gt;Home Directory&lt;/kbd&gt; &amp;rarr; &lt;kbd&gt;Configuration...&lt;/kbd&gt; &amp;rarr; &lt;kbd&gt;Mappings&lt;/kbd&gt;) for files with a &lt;kbd&gt;.tpl&lt;/kbd&gt; extension to execute with &lt;code&gt;C:\Perl\bin\perl.exe -T "%s" %s&lt;/code&gt;; otherwise I'd get an error about &lt;samp&gt;&amp;quot;-T&amp;quot; is on the #! line, it must also be used on the command line&lt;/samp&gt;.&lt;br /&gt;&lt;br /&gt;Here's the script:&lt;code&gt;&lt;pre&gt;#!/usr/bin/perl -wT&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use warnings;&lt;br /&gt;&lt;br /&gt;use CGI::Pretty qw(:standard fatalsToBrowser);&lt;br /&gt;use Config;&lt;br /&gt;&lt;br /&gt;print header, start_html('CGI test page');&lt;br /&gt;&lt;br /&gt;print p('Taint mode ON!') if is_tainted($ENV{PATH});&lt;br /&gt;&lt;br /&gt;print h1('Received CGI parameters'), Dump if param;&lt;br /&gt;&lt;br /&gt;print h1('Environment');&lt;br /&gt;my $env_list;&lt;br /&gt;foreach (keys %ENV) { $env_list .= dt($_) . dd($ENV{$_}) }&lt;br /&gt;print dl($env_list);&lt;br /&gt;&lt;br /&gt;print h1('Perl configuration');&lt;br /&gt;print pre(Config::myconfig);&lt;br /&gt;&lt;br /&gt;print end_html;&lt;br /&gt;&lt;br /&gt;sub is_tainted {&lt;br /&gt; return ! eval { eval("#" . substr(join("", @_), 0, 0)); 1 };&lt;br /&gt;}&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3275938-114193730124095470?l=blog.phoenixtrap.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.phoenixtrap.com/feeds/114193730124095470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3275938&amp;postID=114193730124095470' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/114193730124095470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3275938/posts/default/114193730124095470'/><link rel='alternate' type='text/html' href='http://blog.phoenixtrap.com/2006/03/cgi-dump-script.php' title='CGI dump script'/><author><name>Mark Gardner</name><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry></feed>