Your answer is clear

Colin's Blog

Nested
Let them eat POD!
User: perlDreamer
Date: 7/7/2009 5:44 pm
Views: 1280
Rating: -1    Rate [
|
]

I'm definitely not your average perl programmer.

I've been fixing bugs and writing tests in WebGUI for the last several weeks, and this weekend, I needed a change.  Vegging in front of the TV is off limits (because the kids will veg with me), I did some yard work, finished a book I was reading, but what I really wanted was a simple little programming project.

So I wrote POD for 39 modules in WebGUI.

Why did I do that, you ask?  Well, many of the modules had some amount of POD, it was a very simple project, and we are now 2 modules short of having 100% POD coverage in WebGUI.  In case you're asking yourself, "Why did you stop with only two modules to go?"...

When I started, there were 42 modules that needed POD.  Doug Bell hacked out the POD for Auth::LDAP, and I asked the maintainer of another module to POD it as well (commit is pending).

That leaves one module, and it's a bit of a story about the convergence of two modules.

The module with missing coverage is Asset.pm.  If you read the coverage report, you'll see that Asset.pm has 58% of its subs that need POD.  But if you look at those subroutines, you'll see most (maybe all) of them already have POD.  You'll also notice that the subroutines come from the "mixin" modules.

Asset.pm has several "buddy" classes where methods are organized by topic.  Branch, Version, Clipboard, Trash, Package, Metadata and Export.  Each one of those modules exports their methods into Asset by putting them directly into the Asset namespace via package.  That's right, filename AssetBranch.pm for example, but inside there you'll find "package Asset".  (It's not the most beautiful perl in the world, but it's what we have now)

Our POD test coverage is provided by Pod::Coverage.  It turns out that there is some bug with it working with modules that assign subroutines into different packages.  I verified this by converting one buddy class into using Class::C3, and sure enough, the POD inside it is covered.

I've submitted a bug report with failing tests to Richard Clamp on RT and am hand verifying the Asset classes.  I'm hoping for a quick release of a bug fix, or at least some chastisement for bad module and package organization.

The end goal is that WebGUI's technical debt has been reduced, and we'll be able to keep on top of POD from here on out.

Reply
Re: Let them eat POD!
User: patspam
Date: 7/16/2009 5:23 am
Views: 240
Rating: 0    Rate [
|
]

"and I asked the maintainer of another module to POD it as well (commit is pending)."

Duly committed.. and a bug discovered/fixed in the process!

Reply
PreviousNextAdd
blue divider bar

Copyright 2010 perlDreamer Consulting | All Rights Reserved | Site Map | Graphic Design by Plain Black