Two new Modules: Manage JiffyBox VM and Convert TAP-Archive

I like to announce two modules I created recently during a "Continuous Integration" project at a Perl-Company near Stuttgart in Germany.

The first library is an Perl-OO-Interface to the API for the management of Virtual Machines from the German Hoster JiffyBox. With VM::JiffyBox you can do stuff like creating a new VM, ask or set attributes or delete the VM completely. No more dealing with HTTP and JSON from the API. Just call methods and operate on hash-structures. You can also do some nice oneliners with it. This one e.g. prints out the IP from a specific VM:

perl -MVM::JiffyBox -E '

say VM::JiffyBox->new (token => $ENV{API_TOKEN})
->get_vm ($ENV{BOX_ID})

For more information please visit the docs.

The second module Convert::TAP::Archive can be used to look into TAP-Archives created with prove -a. The problem: Prove can only create archives, but not read them. So the renderers provided with prove are useless if you like to work with archives. Instead of dealing with tgz and the file structure inside the archive, you can now just define a renderer from CPAN and convert the archive into a viewable format. prove -a seemed to be a kind of a dead-end until now. If you find this module useful you are welcome to enhance it. There may be some issues, since I'm not that an expert with all this TAP harnesses. But imho the module is already quite useful for now.

To get the content from a TAP-Archive as HTML you use this code:

my $html = convert_from_taparchive( '/path/to/test.tar.gz', 'TAP::Formatter::HTML', );

I hope this two modules will be of use for others too. A big thank you to plusW, which allowed to release the code to CPAN. You will find a bit more detailed articles about the work on this modules in the coming issue of the $foo-Perl-Magazin (German) this autumn.

Leave a comment

About Boris Däppen

user-pic Philosophy of Technology