<?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' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4341644311552730523</id><updated>2012-01-28T14:31:37.666-07:00</updated><category term='announcement'/><category term='ups'/><category term='software'/><category term='cpan'/><category term='programming'/><category term='perl'/><category term='gisle aas'/><category term='testing'/><category term='api'/><category term='chart'/><category term='google'/><category term='database'/><category term='e-commerce'/><title type='text'>Perl Mods</title><subtitle type='html'>A look at the latest Perl Module releases.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://perl-mods.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://perl-mods.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>JDrago</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_dWLvq0dki_I/S2znVe8ssAI/AAAAAAAAAFw/ZIjpOw_cNh4/S220/warningiconimg.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4341644311552730523.post-5768613926066548097</id><published>2009-03-30T10:20:00.000-06:00</published><updated>2009-03-30T11:49:02.630-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Smoke testing Perl with Test::TAP::HTMLMatrix</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dWLvq0dki_I/SdDzpwFRAmI/AAAAAAAAAFE/cYxaistycw8/s1600-h/test-tap-htmlmatrix.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 200px;" src="http://3.bp.blogspot.com/_dWLvq0dki_I/SdDzpwFRAmI/AAAAAAAAAFE/cYxaistycw8/s320/test-tap-htmlmatrix.png" alt="" id="BLOGGER_PHOTO_ID_5319019058531730018" border="0" /&gt;&lt;/a&gt;Testing is &lt;span style="font-weight: bold;"&gt;Great Fun&lt;/span&gt;, but what is the point if you can't impress your boss with a great-looking report?&lt;br /&gt;&lt;br /&gt;I remember looking at the smoke-test-reports for Pugs several months ago, wondering "How did they make these great test reports?"&lt;br /&gt;&lt;br /&gt;Well, it's pretty easy.  &lt;a href="http://search.cpan.org/%7Enuffin/"&gt;Yuval Kogman&lt;/a&gt;, a prolific Perl module author, has created &lt;a href="http://search.cpan.org/perldoc?Test::TAP::HTMLMatrix"&gt;Test::TAP::HTMLMatrix&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This image is a screenshot of the kind of reports you can get from Test::TAP::HTMLMatrix.  Each test name is hyperlinked to the test file itself.  This example was created with the following script:&lt;br /&gt;&lt;pre&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use warnings;&lt;br /&gt;&lt;br /&gt;use Test::TAP::HTMLMatrix;&lt;br /&gt;use Test::TAP::Model::Visual;&lt;br /&gt;use Test::TAP::Model::Consolidated;&lt;br /&gt;&lt;br /&gt;# make a successful test run&lt;br /&gt;my $model_ok = Test::TAP::Model::Visual-&gt;new_with_tests(&lt;br /&gt;    glob("t/*/*.t")&lt;br /&gt;);&lt;br /&gt;$model_ok-&gt;desc_string("real run");&lt;br /&gt;&lt;br /&gt;my $v = Test::TAP::HTMLMatrix-&gt;new(&lt;br /&gt;    Test::TAP::Model::Consolidated-&gt;new( $model_ok )&lt;br /&gt;);&lt;br /&gt;$v-&gt;has_inline_css(1);&lt;br /&gt;&lt;br /&gt;# this is the most popular view:&lt;br /&gt;print $v-&gt;detail_html;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I run it like this:&lt;br /&gt;&lt;pre&gt;perl smoke.pl &gt; smoke.html&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4341644311552730523-5768613926066548097?l=perl-mods.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://perl-mods.blogspot.com/feeds/5768613926066548097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://perl-mods.blogspot.com/2009/03/smoke-testing-with-testtaphtmlmatrix.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/5768613926066548097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/5768613926066548097'/><link rel='alternate' type='text/html' href='http://perl-mods.blogspot.com/2009/03/smoke-testing-with-testtaphtmlmatrix.html' title='Smoke testing Perl with Test::TAP::HTMLMatrix'/><author><name>JDrago</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_dWLvq0dki_I/S2znVe8ssAI/AAAAAAAAAFw/ZIjpOw_cNh4/S220/warningiconimg.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_dWLvq0dki_I/SdDzpwFRAmI/AAAAAAAAAFE/cYxaistycw8/s72-c/test-tap-htmlmatrix.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4341644311552730523.post-4907163036681509193</id><published>2009-03-27T10:19:00.000-06:00</published><updated>2009-03-27T13:00:47.804-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='e-commerce'/><category scheme='http://www.blogger.com/atom/ns#' term='ups'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='cpan'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Perl UPS API Shootout</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dWLvq0dki_I/Sc0aJMeh1CI/AAAAAAAAAEs/PUfoA1iPFLg/s1600-h/LOGO_L.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 81px; height: 93px;" src="http://1.bp.blogspot.com/_dWLvq0dki_I/Sc0aJMeh1CI/AAAAAAAAAEs/PUfoA1iPFLg/s320/LOGO_L.gif" alt="" id="BLOGGER_PHOTO_ID_5317935480264840226" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;UPS, The United Parcel Service - AKA Big Brown - has been around since 1907.&lt;br /&gt;&lt;br /&gt;Perl, the Practical Extraction and Reporting Language - AKA The Swiss Army Chainsaw - has been around since 1987.&lt;br /&gt;&lt;br /&gt;I've been interacting with the UPS shipping tools since, well, since before they were converted to XML.  About 3 weeks before, actually, and I had to rewrite that entire part of a client's website, for free, and the delay in getting paid nearly cost me my apartment.&lt;br /&gt;&lt;br /&gt;Of course that would never have happened if I had instead used one of the available UPS modules on CPAN, because the modules' authors would have (probably) updated their code to work with the updated UPS interface for me.&lt;br /&gt;&lt;br /&gt;So in an effort to save you some effort, I'll share my foray into the world of Perl/UPS integration options and let you know what I discover.&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/dist/Business-UPS/"&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;Business::UPS&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first thing I noticed about &lt;a href="http://search.cpan.org/dist/Business-UPS/"&gt;Business::UPS&lt;/a&gt; is that the &lt;a href="http://search.cpan.org/perldoc?Business::UPS#SYNOPSIS"&gt;API&lt;/a&gt; seems a little...1999-ish.&lt;br /&gt;&lt;pre&gt; use Business::UPS;&lt;br /&gt;&lt;br /&gt;my ($shipping,$ups_zone,$error) = getUPS(qw/GNDCOM 23606 23607 50/);&lt;br /&gt;$error and die "ERROR: $error\n";&lt;br /&gt;print "Shipping is \$$shipping\n";&lt;br /&gt;print "UPS Zone is $ups_zone\n";&lt;br /&gt;&lt;br /&gt;%track = UPStrack("z10192ixj29j39");&lt;br /&gt;$track{error} and die "ERROR: $track{error};&lt;br /&gt;&lt;br /&gt;# 'Delivered' or 'In-transit'&lt;br /&gt;print "This package is $track{Current Status}\n";&lt;/pre&gt;Also, when I installed Business::UPS via CPAN, I got version 1.13 instead of 2.0.  After manually downloading version 2.0 and doing the standard incantation...&lt;br /&gt;&lt;pre&gt;perl Makefile.PL&lt;br /&gt;make&lt;br /&gt;make test&lt;br /&gt;sudo make install&lt;/pre&gt;...I discovered that the file &lt;span style="font-family:courier new;"&gt;test.pl&lt;/span&gt; does not actually test anything except to make sure that the module does in fact compile.&lt;br /&gt;&lt;br /&gt;I attempted to email the author - cpan@datademons.com - and the email bounced.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;CONCLUSION:&lt;/span&gt;&lt;br /&gt;The module might be filed under the Business:: namespace, but until the author &lt;a href="http://search.cpan.org/%7Ejwheeler/"&gt;Justin Wheeler&lt;/a&gt; adds some real unit tests to this distribution, I wouldn't trust &lt;a href="http://search.cpan.org/dist/Business-UPS"&gt;Business::UPS&lt;/a&gt; to my business, that's for sure.  The apparently abandoned status does not bode well, either.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/dist/WebService-UPS/"&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;Webservice::UPS&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a new distribution (as of March 26th, 2009) and offers a clean, object-oriented interface to some of the UPS API.  Webservice::UPS is built on &lt;a href="http://search.cpan.org/dist/Mouse/"&gt;Mouse&lt;/a&gt;, a minimal implementation of &lt;a href="http://search.cpan.org/dist/Moose/"&gt;Moose&lt;/a&gt;, the postmodern object system for Perl.  This means that Webservice::UPS benefits from the features in Mouse, while remaining lightweight enough for web applications written in &lt;a href="http://search.cpan.org/dist/Apache2-ASP"&gt;Apache2::ASP&lt;/a&gt; or &lt;a href="http://search.cpan.org/dist/Catalyst"&gt;Catalyst&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Unfortunately the module does not (yet) offer the ability to request shipping rates and methods for a package, but I've asked the author &lt;a href="http://www.kbrandt.com/"&gt;Kyle Brandt&lt;/a&gt; about adding that functionality.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;CONCLUSION:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Webservice::UPS looks fairly nice and just might be the right tool for your UPS package-tracking needs.  However, the lack of support for rate and shipping method requests makes me continue the search for a total solution.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/perldoc?Business::Shipping::UPS_XML"&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;Business::Shipping::UPS_XML&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It appears to have been originally released in March of 2004, and the last release was in June of the same year.  Sure, the UPS e-commerce tools don't appear to have changed that much since then, but when you download the documentation (dtk_RateXML_V1.zip) you see that the copyright is 2009.  Something may have changed since 2004 - we don't know, because UPS doesn't give us a changelog with their UPS XML tools, but I have a hunch that we should have something a bit newer than 5 years old and apparently abandoned.&lt;br /&gt;&lt;br /&gt;The module's author, &lt;a href="http://search.cpan.org/%7Edownhom/"&gt;Duane Hinkley&lt;/a&gt; of &lt;a href="http://www.downhomewebdesign.com/"&gt;DownHomeWebDesign.com&lt;/a&gt; fame might make a fresh release soon, or transfer the module to someone else who will take care of it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;CONCLUSION:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Don't use this module.  Write your own.  In fact, write your own and release it on CPAN.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/perldoc?Business::Shipping"&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;Business::Shipping&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It was only after looking through the changelog of Business::UPS that I discovered a reference to Business::Shipping:&lt;br /&gt;&lt;pre&gt;&lt;span class="dh"&gt;@@ -1,3 +1,13 @@&lt;/span&gt;&lt;br /&gt;&lt;span class="a"&gt;+Fri Jun 20 09:27:24 2003  jwheeler  &lt;upsmodule@datademons.com&gt;&lt;br /&gt;+&lt;br /&gt;+       * Changed namespace to the original Business::UPS to make room for&lt;br /&gt;+       Dan Browning's &lt;span style="font-weight: bold;"&gt;Business::Shipping&lt;/span&gt; modules.&lt;br /&gt;+&lt;br /&gt;+Tue Jun 10 13:28:37 2003  jwheeler  &lt;upsmodule@datademons.com&gt;&lt;br /&gt;+&lt;br /&gt;+       * Came across this module, was horribly outdated, rewrote it to work again.&lt;br /&gt;+       * Renamed to Business::Shipping::UPS so as not to interfere with solomon's namespace.&lt;br /&gt;+&lt;/upsmodule@datademons.com&gt;&lt;/upsmodule@datademons.com&gt;&lt;/span&gt;&lt;br /&gt;Mon Feb 22 16:03:01 1999  msolomon  &lt;msolomon@fido.seva.net&gt;&lt;br /&gt;&lt;br /&gt; * UPS.pm: Thanks to pudge@pobox.com, changed a {} to ()&lt;br /&gt;&lt;/msolomon@fido.seva.net&gt;&lt;/pre&gt;I also discovered that because of the way old modules come under the care of new authors, sometimes the person currently assigned blame of a distribution does not deserve it.  (Yes, English is my first language - go figure.)&lt;br /&gt;&lt;br /&gt;Business::Shipping was written by Dan Browning.  Although there is a &lt;a href="http://code.google.com/p/perl-business-shipping/source/browse/#svn/trunk"&gt;Google Code project page&lt;/a&gt;, no code has been checked into it.&lt;br /&gt;&lt;br /&gt;The synopsis from the Business::Shipping CPAN page looks fairly straightforward:&lt;br /&gt;&lt;pre&gt; use Business::Shipping;&lt;br /&gt;&lt;br /&gt;my $rate_request = Business::Shipping-&gt;rate_request(&lt;br /&gt;shipper   =&gt; 'UPS_Offline',&lt;br /&gt;service   =&gt; 'Ground Residential',&lt;br /&gt;from_zip  =&gt; '98683',&lt;br /&gt;to_zip    =&gt; '98270',&lt;br /&gt;weight    =&gt;  5.00,&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;$rate_request-&gt;execute() or die $rate_request-&gt;user_error();&lt;br /&gt;&lt;br /&gt;print $rate_request-&gt;rate();&lt;/pre&gt;Installing Business::Shipping version 2.03 fails.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cpan[3]&gt; install Business::Shipping&lt;br /&gt;Running install for module 'Business::Shipping'&lt;br /&gt;Running make for D/DB/DBROWNING/Business-Shipping-2.03.tar.gz&lt;br /&gt;Has already been unwrapped into directory /home/john/.cpan/build/Business-Shipping-2.03-l3GrDY&lt;br /&gt;Has already been made&lt;br /&gt;Running make test&lt;br /&gt;PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t&lt;br /&gt;t/10_init....................ok&lt;br /&gt;t/15_Pod.....................ok &lt;br /&gt;t/16_Pod-Coverage............skipped: (no reason given)&lt;br /&gt;t/20_business_shipping.......skipped: (no reason given)&lt;br /&gt;t/21_preload.................skipped: (no reason given)&lt;br /&gt;t/22_Version.................ok&lt;br /&gt;t/30_USPS_Online.............skipped: (no reason given)&lt;br /&gt;t/31_USPS_Online_Tracking....skipped: (no reason given)&lt;br /&gt;t/40_UPS_Online..............skipped: (no reason given)&lt;br /&gt;t/41_UPS_Online_Shop.........skipped: (no reason given)&lt;br /&gt;t/42_UPS_Online_COD..........skipped: (no reason given)&lt;br /&gt;t/45_UPS_Offline.............skipped: (no reason given)&lt;br /&gt;t/61_Log4perl................1/? Global symbol "$INFO" requires explicit package name at t/61_Log4perl.t line 16.&lt;br /&gt;Execution of t/61_Log4perl.t aborted due to compilation errors.&lt;br /&gt;# Looks like your test exited with 255 just after 2.&lt;br /&gt;t/61_Log4perl................ Dubious, test returned 255 (wstat 65280, 0xff00)&lt;br /&gt;All 2 subtests passed&lt;br /&gt;t/70_countries...............skipped: (no reason given)&lt;br /&gt;t/80_usertag_sim.............skipped: (no reason given)&lt;br /&gt;&lt;br /&gt;Test Summary Report&lt;br /&gt;-------------------&lt;br /&gt;t/61_Log4perl            (Wstat: 65280 Tests: 2 Failed: 0)&lt;br /&gt;Non-zero exit status: 255&lt;br /&gt;Files=15, Tests=42,  3 wallclock secs ( 0.06 usr  0.01 sys +  2.16 cusr  0.19 csys =  2.42 CPU)&lt;br /&gt;Result: FAIL&lt;br /&gt;Failed 1/15 test programs. 0/42 subtests failed.&lt;br /&gt;make: *** [test_dynamic] Error 255&lt;br /&gt;DBROWNING/Business-Shipping-2.03.tar.gz&lt;br /&gt;/usr/bin/make test -- NOT OK&lt;br /&gt;//hint// to see the cpan-testers results for installing this module, try:&lt;br /&gt;reports DBROWNING/Business-Shipping-2.03.tar.gz&lt;br /&gt;Running make install&lt;br /&gt;make test had returned bad status, won't install without force&lt;br /&gt;Failed during this command:&lt;br /&gt;DBROWNING/Business-Shipping-2.03.tar.gz      : make_test NO&lt;br /&gt;&lt;/pre&gt;I did a "force install" since the error appeared to be a syntax error in a test (not a good sign).&lt;br /&gt;&lt;br /&gt;I tried running the code from the synopsis and received the following error:&lt;br /&gt;&lt;pre&gt;john@ubuntu-pc1:~/Desktop/ups$ perl bus-ship.pl&lt;br /&gt;Use of uninitialized value $/ in join or string at /usr/local/share/perl/5.10.0/Config/IniFiles.pm line 2117.&lt;br /&gt;Can't use string ("service=XDM to_country=Australia") as an ARRAY ref while "strict refs" in use at /usr/local/share/perl/5.10.0/Business/Shipping/Config.pm line 172.&lt;br /&gt;&lt;/pre&gt;That error does not make any sense, since my test script was trying to ship something from Denver to Los Angeles, not Australia.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;CONCLUSION:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Do not use Business::Shipping, especially not for business.  I tried to email Dan Browning at dan.browning@kavod.com but my email bounced.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="font-weight: bold;"&gt;THE BOTTOM LINE:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I started this post thinking "&lt;span style="font-style: italic;"&gt;It's been a while since I did any UPS stuff with Perl - there's got to be some great tools out there now.&lt;/span&gt;"  Well maybe not so much, not today anyway.&lt;br /&gt;&lt;br /&gt;We Perl hackers should have a nice interface to find out whether we can ship UPS Ground from Hawaii to Florida, or if Next Day Air is an option for shipping something 2 miles away.  All it takes is 45 minutes of winding your way through the bizzare maze of broken links and password requests on the UPS website, plus the ability to make a few HTTP requests and send some HORRIBLY BROKEN XML to the UPS web services (more on that later).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4341644311552730523-4907163036681509193?l=perl-mods.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://perl-mods.blogspot.com/feeds/4907163036681509193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://perl-mods.blogspot.com/2009/03/perl-ups-api-shootout.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/4907163036681509193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/4907163036681509193'/><link rel='alternate' type='text/html' href='http://perl-mods.blogspot.com/2009/03/perl-ups-api-shootout.html' title='Perl UPS API Shootout'/><author><name>JDrago</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_dWLvq0dki_I/S2znVe8ssAI/AAAAAAAAAFw/ZIjpOw_cNh4/S220/warningiconimg.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_dWLvq0dki_I/Sc0aJMeh1CI/AAAAAAAAAEs/PUfoA1iPFLg/s72-c/LOGO_L.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4341644311552730523.post-7592956219485549767</id><published>2009-03-26T22:19:00.000-06:00</published><updated>2009-03-26T23:08:29.365-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>DBD::Google - Treat Google as a datasource for DBI</title><content type='html'>Somehow all of our information ends up on Google.  Now we can treat Google like a database and query it with SQL just like a simple database:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl -w&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use warnings 'all';&lt;br /&gt;use DBI;&lt;br /&gt;use Data::Dumper;&lt;br /&gt;&lt;br /&gt;my $key = 'ABQIAAA...-P_bCg';&lt;br /&gt;my $dbh = DBI-&gt;connect("dbi:Google:", $key);&lt;br /&gt;my $sth = $dbh-&gt;prepare('SELECT title, URL FROM google WHERE q = "perl"');&lt;br /&gt;$sth-&gt;execute();&lt;br /&gt;while( my $rec = $sth-&gt;fetchrow_hashref )&lt;br /&gt;{&lt;br /&gt;warn Dumper( $rec );&lt;br /&gt;}# end while()&lt;br /&gt;$sth-&gt;finish();&lt;br /&gt;$dbh-&gt;disconnect();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Unfortunately, it requires you to get a Google SOAP API Key, which Google no longer supports.&lt;br /&gt;&lt;br /&gt;Perhaps the author, &lt;a href="http://search.cpan.org/%7Edarren/"&gt;Darren Chamberlain&lt;/a&gt;, will consider upgrading DBD::Google to use REST::Google or something similar instead.&lt;br /&gt;&lt;br /&gt;Here's to hoping :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4341644311552730523-7592956219485549767?l=perl-mods.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://perl-mods.blogspot.com/feeds/7592956219485549767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://perl-mods.blogspot.com/2009/03/dbdgoogle-treat-google-as-datasource.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/7592956219485549767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/7592956219485549767'/><link rel='alternate' type='text/html' href='http://perl-mods.blogspot.com/2009/03/dbdgoogle-treat-google-as-datasource.html' title='DBD::Google - Treat Google as a datasource for DBI'/><author><name>JDrago</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_dWLvq0dki_I/S2znVe8ssAI/AAAAAAAAAFw/ZIjpOw_cNh4/S220/warningiconimg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4341644311552730523.post-7384456585872787286</id><published>2009-03-26T21:35:00.000-06:00</published><updated>2009-03-27T15:07:00.859-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gisle aas'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>URI::GoogleChart - Generate Google Chart URIs</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://chart.apis.google.com/chart?cht=lxy&amp;amp;chs=200x125&amp;amp;chco=3072F3,FF0000&amp;amp;chd=t:5.3,16.0,37.2,79.8,90.4,95.7,100%7C16.0,26.6,37.2,47.9,58.5,69.1,79.8%7C-1%7C0,21.3,42.6,63.8,85.1"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 125px;" src="http://chart.apis.google.com/chart?cht=lxy&amp;amp;chs=200x125&amp;amp;chco=3072F3,FF0000&amp;amp;chd=t:5.3,16.0,37.2,79.8,90.4,95.7,100%7C16.0,26.6,37.2,47.9,58.5,69.1,79.8%7C-1%7C0,21.3,42.6,63.8,85.1" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Google Charts.  Everything goes just fine until you want to do something slightly complicated, like this (left) which involves a complex URL like this:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="uri"  style="font-family:courier new;"&gt;http://chart.apis.google.com/chart?cht=lxy&amp;amp;chs=200x125&amp;amp;chco=3072F3,FF0000&amp;amp;chd=t:5.3,16.0,37.2,79.8,90.4,95.7,100%7C16.0,26.6,37.2,47.9,58.5,69.1,79.8%7C-1%7C0,21.3,42.6,63.8,85.1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I don't know about you, but that looks like a real pain to remember and get correct all the time.&lt;br /&gt;&lt;br /&gt;However, that chart was generated with the spectacular new &lt;a href="http://search.cpan.org/dist/URI-GoogleChart/"&gt;URI::GoogleChart&lt;/a&gt; from the intrepid Norwegian Perl hacker &lt;a href="http://search.cpan.org/%7Egaas/"&gt;Gisle Aas&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The only code necessary to generate that chart was this:&lt;br /&gt;&lt;pre&gt;URI::GoogleChart-&gt;new("lxy", 200, 125,&lt;br /&gt; data =&gt; [&lt;br /&gt;   [10,20,40,80,90,95,99],&lt;br /&gt;   [20,30,40,50,60,70,80],&lt;br /&gt;   [undef],&lt;br /&gt;   [5,25,45,65,85],&lt;br /&gt; ],&lt;br /&gt; color =&gt; [qw(3072F3 red)],&lt;br /&gt;);&lt;/pre&gt;Now that looks a bit more readable, doesn't it?&lt;br /&gt;&lt;br /&gt;As you can see in the examples below, URI::GoogleChart makes it easy to generate many kinds of charts with the Google Charts API.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;URI::GoogleChart Examples&lt;/span&gt;&lt;br /&gt;&lt;div class="eg"&gt;&lt;br /&gt;&lt;pre class="src"&gt;URI::GoogleChart-&gt;new("pie-3d", 250, 100,&lt;br /&gt; data =&gt; [60, 40],&lt;br /&gt; chl =&gt; "Hello|World",&lt;br /&gt;);&lt;br /&gt;&lt;/pre&gt;    &lt;div&gt;&lt;img src="http://chart.apis.google.com/chart?cht=p3&amp;amp;chs=250x100&amp;amp;chd=t:100,66.7&amp;amp;chl=Hello%7CWorld" /&gt;&lt;/div&gt;      &lt;/div&gt;&lt;br /&gt;&lt;div class="eg even"&gt;&lt;br /&gt;&lt;pre class="src"&gt;URI::GoogleChart-&gt;new("lines", 200, 125,&lt;br /&gt; data =&gt; [40,60,60,45,47,75,70,72,],&lt;br /&gt; min =&gt; 0,&lt;br /&gt; max =&gt; 100,&lt;br /&gt;);&lt;br /&gt;&lt;/pre&gt;    &lt;div&gt;&lt;img src="http://chart.apis.google.com/chart?cht=lc&amp;amp;chs=200x125&amp;amp;chd=t:40,60,60,45,47,75,70,72" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="eg"&gt;&lt;br /&gt;&lt;pre class="src"&gt;URI::GoogleChart-&gt;new("sparklines", 200, 125,&lt;br /&gt; data =&gt; [27,25,60,31,25,39,25,31,26,28,80,28,27,31,27,29,26,35,70,25],&lt;br /&gt; min =&gt; 0,&lt;br /&gt; max =&gt; 100,&lt;br /&gt;);&lt;br /&gt;&lt;/pre&gt;    &lt;div&gt;&lt;img src="http://chart.apis.google.com/chart?cht=ls&amp;amp;chs=200x125&amp;amp;chd=t:27,25,60,31,25,39,25,31,26,28.0,80,28.0,27,31,27,29.0,26,35,70,25" /&gt;&lt;/div&gt;  &lt;/div&gt;&lt;br /&gt;&lt;div class="eg even"&gt;&lt;br /&gt;&lt;pre class="src"&gt;URI::GoogleChart-&gt;new("lxy", 200, 125,&lt;br /&gt; data =&gt; [&lt;br /&gt;   [10,20,40,80,90,95,99],&lt;br /&gt;   [20,30,40,50,60,70,80],&lt;br /&gt;   [undef],&lt;br /&gt;   [5,25,45,65,85],&lt;br /&gt; ],&lt;br /&gt; color =&gt; [qw(3072F3 red)],&lt;br /&gt;);&lt;br /&gt;&lt;/pre&gt;    &lt;div&gt;&lt;img src="http://chart.apis.google.com/chart?cht=lxy&amp;amp;chs=200x125&amp;amp;chco=3072F3,FF0000&amp;amp;chd=t:5.3,16.0,37.2,79.8,90.4,95.7,100%7C16.0,26.6,37.2,47.9,58.5,69.1,79.8%7C-1%7C0,21.3,42.6,63.8,85.1" /&gt;&lt;/div&gt;    &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="eg"&gt;&lt;pre class="src"&gt;URI::GoogleChart-&gt;new("horizontal-stacked-bars", 200, 150,&lt;br /&gt; data =&gt; [&lt;br /&gt;   [10,50,60,80,40],&lt;br /&gt;   [50,60,100,40,20],&lt;br /&gt; ],&lt;br /&gt; min =&gt; 0,&lt;br /&gt; max =&gt; 200,&lt;br /&gt; color =&gt; [qw(3072F3 f00)],&lt;br /&gt;);&lt;br /&gt;&lt;/pre&gt;    &lt;div&gt;&lt;img src="http://chart.apis.google.com/chart?cht=bhs&amp;amp;chs=200x150&amp;amp;chco=3072F3,ff0000&amp;amp;chd=t:5,25,30,40,20%7C25,30,50,20,10" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="eg even"&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="src"&gt;URI::GoogleChart-&gt;new("vertical-grouped-bars", 300, 125,&lt;br /&gt; data =&gt; [&lt;br /&gt;   [10,50,60,80,40],&lt;br /&gt;   [50,60,100,40,20],&lt;br /&gt; ],&lt;br /&gt; min =&gt; 0,&lt;br /&gt; max =&gt; 100,&lt;br /&gt; chco =&gt; "3072F3,ff0000",&lt;br /&gt;);&lt;br /&gt;&lt;/pre&gt;    &lt;div&gt;&lt;img src="http://chart.apis.google.com/chart?cht=bvg&amp;amp;chs=300x125&amp;amp;chco=3072F3,ff0000&amp;amp;chd=t:10,50,60,80,40%7C50,60,100,40,20" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;" class="uri"  &gt;http://chart.apis.google.com/chart?cht=bvg&amp;amp;chs=300x125&amp;amp;chco=3072F3,ff0000&amp;amp;chd=t:10,50,60,80,40%7C50,60,100,40,20&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="eg"&gt;&lt;br /&gt;&lt;pre class="src"&gt;URI::GoogleChart-&gt;new("gom", 125, 80, data =&gt; 80, chl =&gt; 80, title =&gt; "Awesomeness");&lt;br /&gt;&lt;/pre&gt;    &lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://chart.apis.google.com/chart?cht=gom&amp;amp;chs=125x80&amp;amp;chd=t:80&amp;amp;chl=80&amp;amp;chtt=Awesomeness"&gt;&lt;img style="cursor: pointer; width: 125px; height: 80px;" src="http://chart.apis.google.com/chart?cht=gom&amp;amp;chs=125x80&amp;amp;chd=t:80&amp;amp;chl=80&amp;amp;chtt=Awesomeness" alt="" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;/div&gt;&lt;br /&gt;&lt;div class="eg even"&gt;&lt;br /&gt;&lt;pre class="src"&gt;URI::GoogleChart-&gt;new("usa", 200, 100);&lt;br /&gt;&lt;/pre&gt;   &lt;div&gt;&lt;img src="http://chart.apis.google.com/chart?cht=t&amp;amp;chtm=usa&amp;amp;chs=200x100" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4341644311552730523-7384456585872787286?l=perl-mods.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://perl-mods.blogspot.com/feeds/7384456585872787286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://perl-mods.blogspot.com/2009/03/urigooglechart-generate-google-chart.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/7384456585872787286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/7384456585872787286'/><link rel='alternate' type='text/html' href='http://perl-mods.blogspot.com/2009/03/urigooglechart-generate-google-chart.html' title='URI::GoogleChart - Generate Google Chart URIs'/><author><name>JDrago</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_dWLvq0dki_I/S2znVe8ssAI/AAAAAAAAAFw/ZIjpOw_cNh4/S220/warningiconimg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4341644311552730523.post-5344976295081714731</id><published>2009-03-25T23:06:00.000-06:00</published><updated>2009-03-25T23:08:23.125-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='announcement'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>CPAN Release Reviews</title><content type='html'>This blog features (or will soon) reviews of recently-released Perl modules and when possible, an interview with the module's author(s).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4341644311552730523-5344976295081714731?l=perl-mods.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://perl-mods.blogspot.com/feeds/5344976295081714731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://perl-mods.blogspot.com/2009/03/cpan-release-reviews.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/5344976295081714731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4341644311552730523/posts/default/5344976295081714731'/><link rel='alternate' type='text/html' href='http://perl-mods.blogspot.com/2009/03/cpan-release-reviews.html' title='CPAN Release Reviews'/><author><name>JDrago</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_dWLvq0dki_I/S2znVe8ssAI/AAAAAAAAAFw/ZIjpOw_cNh4/S220/warningiconimg.jpg'/></author><thr:total>0</thr:total></entry></feed>
