Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Bernhard (4508)

https://www.xing ... hard_Schmalhofer

A freelance software engineer with experience in webapplications, databases and bioinformatics.

A contributor to Parrot and the person behind Pipp.

A physicist who worked with third sound in Helium-III and CCD X-ray detectors.

barney on
github: []
LinkedIn: []
XING: []

Journal of Bernhard (4508)

Saturday July 09, 2005
09:00 AM

Cool things at $work

[ #25601 ]

My main project at $work is a Mason-based webapplication for keeping track of interesting biological sequences. As a new round of develoment is just starting, I finally took some time to do some refactoring and to beef up my test suite.

Almost all the application logic, interface to the database and connection to the world is wrapped in a set of Perl5 modules. Running the existing test suite with Devel::Cover was dead easy. It immediately showed me missing tests. Even better, it pointed me to some obsolete code. This is very good, as deleted code is guaranteed to be bugfree code.

The next toy was Test::TAP::HTMLMatrix. I think that there is no support from Module::Build yet, but I could avoid coding by fetching a script from There is still some red in the generated HTML, but I blame it on the world, that keeps on changing.

In the left frame of the webapplication there is a project tree, that can contain several hundred nodes. This used to be a homegrown tree, but I replaced it with a COOLjsTree, The COOLjsTree has a fairly complete API and certainly looks more professional than my old tree. My old tree only excelled in the speed of opening and closing subtrees, as it was simply a nested unordered list with some CSS and JavaScript.

I also switched to returning instances of Return::Value from some methods. It is nice to have a standardized returnvalue. However I feel somewhat uneasy about the overloaded get_bool() and get_string().

What are the next cool things? Catalyst with HTML::Mason views sound good for the next project. For web testing I'd like to use HTTP::Recorder and WWW::Mechanize, but I think that I can't do without JavaScript support.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • What makes you uncomfortable, specifically? Is it just a vague sense of "this is weird" or something else?
    • Well, it is more the "this is weird" kind of feeling. Overloading is at least in Perl not an everyday language feature. I doubt that most of my colleagues are aware that Perl has overloading, so the code with Return::Value might be neater, but not more intuitive.

      Then there is a potential for confusion. A return value can be logically true, but evaluate to a zero length string. Otherwise it can be logically false, but print as an non-empty string.

      use strict;
      use Return::Value;

      print "\nRetval is failur

      /* */