Menu Home

Hello https://metacpan.org/release/Scientist

I am pleased to release on the unsuspecting internet a new CPAN module: https://metacpan.org/release/Scientist

This is a Perl 5 implementation of the ideas described in the Ruby gem released by the good people at GitHub (http://githubengineering.com/scientist/).

Scientist is a module that helps with testing of refactored code. Basically it runs two pieces of code and compares the results; so the use case is that you have an old sub and a new one and you want to be sure that the results from both are identical.

I recently did this in a piece of work at my $DayJob, but basically hand rolled it with is_deeply from Test::More. My basic implementation in Scientist does it with eq_deeply from Test::Deep::NoTest which is in effect the same; but unlike my hack at work does not give TAP output.

I released a new version today that also provides microsecond timings in the result set on the two versions of code under test.

The module is VERY basic and raw (hello Perl community come play).

I released it early mainly to get the ball rolling; and after having released it a colleague in the office pointed me at the Hacknews link with various implementations in other languages. So I’m pleased I got Scientist up to catch the wave and keep Perl5 in the mix.

I’ll be updating the module as I go along and I hope that others will come join the party.

Lance

 

[UPDATE: 03/03/2016] CV-Library Tech Blog post on Scientist: http://tech-blog.cv-library.co.uk/2016/03/03/introducing-scientist/

Categories: Uncategorized

Lance