| Subcribe via RSS

Perl Module Release: RPC-XML 0.71

December 7th, 2009 | No Comments | Posted in CPAN, Perl, Software, XML
Version: 0.71 Released: Monday December 7, 2009, 08:00:00 PM -0700


  • t/01_pod.t (deleted)
  • t/02_pod_coverage.t (deleted)
  • t/03_meta.t (deleted)
  • t/04_minimumversion.t (deleted)
  • t/05_critic.t (deleted)
  • xt/01_pod.t (added)
  • xt/02_pod_coverage.t (added)
  • xt/03_meta.t (added)
  • xt/04_minimumversion.t (added)
  • xt/05_critic.t (added)

Moved author-only tests to xt/, updated MANIFEST.

Add test suite 28_parser_bugs_50013.t, which was omitted from last release.
  • xt/01_pod.t
  • xt/02_pod_coverage.t
  • xt/03_meta.t
  • xt/04_minimumversion.t
  • xt/05_critic.t

Re-engineered the author-only/release tests, since they're no longer in the t/ directory and thus should not interfere.
Tags: , , ,

Perl Module Release: RPC-XML 0.70

December 6th, 2009 | No Comments | Posted in CPAN, Perl, Software, XML
Version: 0.70 Released: Sunday December 6, 2009, 10:00:00 PM -0700


  • lib/RPC/XML.pm
  • t/10_data.t

RT #49406: Make Base64 data-type allow zero-length data.

  • lib/RPC/XML.pm
  • t/10_data.t

Hand-applied a patch (most likely from Bill Moseley) to extend the construction of dateTime.iso8601 data-types.
  • t/40_server.t

Fixed another corner-case for the url() test.
  • lib/RPC/XML.pm

Fixed a case from previous work that caused "undef" warnings.
  • lib/RPC/XML.pm
  • lib/RPC/XML/Parser.pm
  • t/28_parser_bugs_50013.t

RT #50013: Restore backwards-compatibility for projects that use RPC::XML::Parser directly.

  • lib/RPC/XML/Procedure.pm

RT #50143: Incorrectly called server_fault() as if it were a coderef.

  • lib/Apache/RPC/Server.pm

Applied patch from Frank Wiegand to fix a POD problem.
  • lib/RPC/XML.pm

Some additional regexp issues on dateTime.iso8601, to handle backwards-compatibility.
  • lib/RPC/XML/ParserFactory.pm

Fixed some minor doc errors.
  • lib/RPC/XML/Parser/XMLParser.pm

Moved the 'require' of some libraries to the point where they are first needed, to delay loading until/unless necessary.
  • lib/RPC/XML/Parser/XMLLibXML.pm (added)
  • t/21_xml_libxml.t (added)
  • t/29_parserfactory.t
  • t/40_server_xmllibxml.t (added)

Implement support for XML::LibXML in the parser-factory.
Tags: , , ,

Advents, Advents Everywhere

December 3rd, 2009 | 1 Comment | Posted in Perl

Perl seems to always lead the language-pack in terms of Advent Calendars each year. Here are a few that I know of, that I’m following daily:

Go forth and, errr, advent…


Perl Module Monday: Chart::Clicker

November 23rd, 2009 | 3 Comments | Posted in CPAN, Perl

I’ve been interested in the Chart::Clicker package for a while, and today it came up in a series of Twitter messages in my #perl search. So that seemed like a sign that it would be a good pick for this week’s feature.

Chart::Clicker is a mature, very feature-rich charting package that comes with a cookbook and many examples (the code for the examples is available on GitHub). There’s also a tutorial POD in the distribution. It does pie charts, line graphs, bar graphs, area graphs, stacked bar or area or line graphs,  points, bubbles, or candlestick-style charts. In short, it makes pretty pictures in Perl:


area.png, from the Examples page

The above is just one of the images shown as examples of what Chart::Clicker can do.

The module bases its rendering on Graphics::Primitive, specifically Graphics::Primitive::Driver::Cairo. This means it can render the chart in any format Cairo supports; PNG, PDF, even SVG among others. The internal object-model is based on Moose, which leads to keeping potentially-duplicate code to a minimum. Using the package is about as complex as you need your graph to be: a simple graph with a single set of data can be created in just 5 lines of code or so, while some of the examples are much more complicated scripts.

I’m surprised to see (according to CPANTS) that this module is not a component in any other packages’ lists of dependencies. It would seem to me to be a logical bit of functionality to integrate into a Catalyst view, or any stats package. I won’t be surprised if this changes in the near future, as (hopefully) more people start using the package.

Tags: , ,

Dueling Twitter-Bots

November 19th, 2009 | 2 Comments | Posted in CPAN, Perl, Twitter

It looks as though I have some “competition” for my CPAN Twitter bot (@cpan_linked). The last few days I’ve been seeing posts from @cpanlive in my Perl search-column (I use Seesmic Desktop, with a permanent column for searches on “#perl“). This seems to be pretty much identical in intent to my bot, with some differences. I’ll cover those and what I think of them:

No URL-Shortening

Where I do URL-shortening (currently through TinyURL due to some down-time with Metamark, though I think they’re back up now), @cpanlive doesn’t. I believe that if the status message were to exceed 140 characters, Twitter would notice this and scan the message for URLs to shorten automatically. In the end, I suppose it’s a matter of taste– with @cpanlive you’ll see the actual URL the majority of the time.


I usually provide two links, the second being to the “Changes” (Changes, ChangeLog, etc.) file, or the README if I can’t find a change-log. @cpanlive provides just the main link. I also include the author’s name. This goes back to the use of URL-shortening– I’m careful to keep my status under 140 characters, but having pre-shortened the links gives me more room to play with.


I don’t use any hash-tags, currently. @cpanlive uses both “#Perl” and “#CPAN”. On the one hand, I probably wouldn’t have even known about this if it weren’t for the tagging, as I wouldn’t have seen it otherwise. On the other hand, this puts a lot of data from a single bot into the #perl search-stream. Most people know to follow a given bot if they want CPAN stream updates, and would prefer to not have them cluttering up #perl.

That said, I am considering adding #CPAN to the updates that @cpan_linked puts out, as well as the re-write that I’m (slowly) working on. I think that such data is more useful to users searching on #CPAN than those searching on #Perl.

Speed and Pacing

When @cpan_linked gets a cluster of several CPAN updates at once, it tries to spread them out over the next period between polls of search.cpan.org‘s RDF feed. Currently, I poll it every 15 minutes, so if I get 5 new items to post they get posted roughly 3 minutes apart. It looks like @cpanlive doesn’t do anything like this, as the updates seem be in “clumps”, which is what I was trying to avoid. Again, a matter of taste. I didn’t want the bot to suddenly spew 10-20 updates into my Twitter stream, pushing everything else “below the fold” as it were. Other followers might not care one way or the other.

Something I’ve noticed, though, is that @cpanlive seems to be about an hour or so behind @cpan_linked, on average. I assume that they’re polling the RDF source hourly, rather than the 15-minute interval I use.


Well, there’s no “conclusion” here, really. I mean, it’s not like I have an exclusive license to relay CPAN releases to Twitter. If such an exclusive right existed, it wouldn’t be mine in the first place! I do wonder about the reason for doing it over again, though it may just be someone’s project for learning how to use the Net::Twitter modules. It does push me to get cracking on my re-write, though, as I have other features planned that should make it even more useful.

Tags: , ,

Perl Module Monday: DBIx::Connector

November 9th, 2009 | 2 Comments | Posted in CPAN, Perl

For this installment of PMM, I would like to venture into the realm of database connectivity and bring some attention on a new player, David Wheeler‘s DBIx::Connector.

What I like most about this is that it scratches a particular itch I often have when writing long-lived DB code: I get tired of always pinging the database through the handle, to make sure the connection is still there before attempting any new operation. On this point alone, DBIx::Connector is worth installing.

Fortunately, that wasn’t the only itch he was scratching, when he wrote it, so it does a lot more than just simplify persistent connections. It’s fork- and thread-safe, handles transactions and save-points (nested, no less), and does it all while letting you choose when/if the database gets pinged, and what happens when the connection is no longer active.

For more explanation and coverage, see David’s post here. He’s also woven it into his Catalyst tutorial, which is tagged here (and made available on GitHub here).

Tags: , , ,

I Would Like My Brain Back, Please

November 3rd, 2009 | No Comments | Posted in Meta-Posts, Perl

For a while now, I have been having some health problems that have spilled over into my professional life. More to the point, a variety of issues ranging from thyroid to others have made it very hard to sleep well and killed a lot of my ability to concentrate. To make matters worse, some of the medications I take for these problems have been compounding the other problems.

The end result? I miss my old brain in a lot of ways. Mostly, I miss hacking my CPAN modules as much as I did just a few years ago. I have a number of modules with exciting features waiting to be added, or bugs that I know how to fix, waiting to be fixed. And that’s just Perl/CPAN work… there’s Java, JavaScript, and other things rattling around in my head, but never quite making it to my fingertips. I can’t really explain very well in this medium what it is that is interfering with my efforts; it’s sufficient just to say that I’m very unhappy with myself over the last few years.

I need desperately to break out of this cycle, and get myself back on track. It’s affecting $DAY_JOB, as well, and I happen to be rather fond of the current job and I’m not in any hurry to be moving on to things new.

Tags: ,

Perl Module Monday: Try::Tiny

October 26th, 2009 | No Comments | Posted in CPAN, Perl

While I am a devout and enthusiastic Perl proponent, there are things that I wish Perl had, or had done differently. One of these is the lack of a clearly-defined exception framework. It’s one of the (very) few things I think Java does better than Perl. Over the years, CPAN has been host to several variations on try/catch-style syntactic sugar. But  I now have a favorite: Try::Tiny.

While I had noticed the module scroll by the CPAN Twitter feed, I hadn’t paid much attention to it at first. I like the idea of clean try/catch, but I haven’t used it in any of my modules because I didn’t want to make the lists of dependencies any longer than they have to be. TryCatch, for example, uses Moose, which is a lot to install simply to have a clean exception model.

Then I read this blog post about it, and became much more interested. First off, Tatsuhiko was showing a lot of enthusiasm for something for something that isn’t Plack or PSGI (just teasing!). But mostly, it was just the relief of having a nice try/catch pair with no dependencies.

Let me say that part again, just in case you’re skimming: NO DEPENDENCIES.

Well, aside from Test::More at build-time, but you have that lying around already, right?

This one is absolutely going into the toolbox for future use. I’m also going to look for places where it seems to be an especially-good fit with other modules. (More on that, later.)

Try::Tiny. Give it a, errrr, try…

Tags: , ,

Perl Module Release: Image::Size 3.210

October 21st, 2009 | 1 Comment | Posted in CPAN, Perl, Software

(Eventually, when I am more comfy with playing around with my WordPress components, these posts will be automated by my release process, and the content will be much more nicely-formatted.)

Version: 3.210 Released: Wednesday October 21, 2009, 06:50:00 PM -0700


  • t/magick.t

Removed a stray colon causing errors with some Perl versions.

  • t/00_load.t (added)
  • t/00_signature.t (deleted)
  • t/01_pod.t (added)
  • t/02_pod_coverage.t (added)
  • t/03_meta.t (added)
  • t/04_minimumversion.t (added)
  • t/05_critic.t (added)
  • t/magick.t
  • t/pod.t (deleted)
  • t/pod_coverage.t (deleted)

Removed useless signature test, added QA tests, removed a duplicate test.

  • lib/Image/Size.pm

Moved around some conditionally-needed libs to delay loading until/unless needed. Also made a small fix per Perl::Critic.

Tags: , , ,

Perl Module Monday: Timeout::Queue

October 12th, 2009 | No Comments | Posted in CPAN, Perl

This week, another in the modules-I-plan-to-use series. For my current CPAN Twitter-bot, I essentially wrote the infrastructure that Timeout::Queue would have provided me with, had I known about it at the time. So I plan to use it in my ongoing re-write (which isn’t much further along than the last time I mentioned it).

What it does, in a nutshell, is manage a queue in terms of how soon each item is supposed to occur in time. As an element is enqueued, part of the process is specifying how soon the item should “time-out” in reference to the current moment. Then the object referent can be used to sleep until the next element’s time-out occurs, at which point you can retrieve all the items that are currently “timed-out”.

In my current bot, I poll the RDF feed from search.cpan.org every 15 minutes. When there are new items to post to the Twitter stream, I try to space them out over the next 15 minutes so that the bot doesn’t spew too many updates at once. I do this by dividing the 15 minute interval by the number of updates to post, then queuing them up with appropriate gaps between them. I also use the same queue approach to set the next poll of the feed, to check for changes/updates.

The code isn’t overly-complex, but it does lend itself to some subtle errors. In the early stages, I would often see updates come in “clumps”, because I had mis-managed the offset calculations. Had I known about this module, I could have saved myself some work. It does everything my code does, and does a few things more that I didn’t think to write.

If I could change anything about the module, I’d probably just have it offer a sleep() method to avoid having to explicitly ask for the current amount of time to wait, then having to do the sleep myself. It seems like that will always be the usage pattern, so it would make sense to have it be an available method. Then again, if it’s a good OO citizen and can be easily sub-classed, maybe I’ll just sub-class it and add the method myself! Then I can make the other change– the name. Call me pedantic, but I feel that “Queue” should have been the first element of the namespace, and I’m not really keen on the use of “Timeout”, since the items don’t really “time-out” in the sense of waiting for an alarm signal or anything. But these are minor nits.

This will be Yet Another piece of code that makes my coding task easier. (Once I get enough tuits to get back to that project.)

Tags: , ,