July 2012 Archives

Perils of Plugins

Plugin-based architectures can be a bad idea.

Not always. In user-facing applications, where the list of installed and enabled plugins is clear, then plugins are often a good thing. This article is concerned not with end-user facing applications, but with libraries. Libraries that allow their functionality to be extended through plugins. In particular, libraries that automatically detect and load all installed plugins.

Plugins aren't always obviously plugins. In this article, I'm defining a plugin as a software module that adds additional functionality or modifies the external…

Happy Pi Day!

Did you know that 22/7 is actually a better approximation of pi than 3.14 is?

use DateTime;
use Math::Trig qw(pi);
use Test::More tests => 1;

my $today = DateTime::->now;
my $dm    = sprintf '%d/%d' => ($today->day, $today->month);

	abs( eval($dm) - pi ),
or diag("this test only passes on 22/7")

10 Out Of 10

How to File a Perfect Bug Report

My criteria for a perfect bug report...

  1. The report is filed correctly.
  2. The issue identified affects the latest version of the software.
  3. The report includes a test script illustrating the problem
  4. ... which is self-contained
  5. ... and is minimal
  6. ... and conforms to the Test Anything Protocol.
  7. The report includes an explanation.
  8. The report includes patch
  9. ... which is well-written
  10. ... and obeys coding conventions.

Obviously all reports of genuin…

About Toby Inkster

user-pic I'm tobyink on CPAN, IRC and PerlMonks.