February 2014 Archives

Getting a progress report from a running program

Imagine this scenario: you ran a program to do some (potentially) long-running task. The program has a --verbose or --debug command-line option to print progress report to stdout and/or log file. This time you forgot to issue the command-line option and 10 minutes into it you wonder how the program is doing. You could start over by terminating the program and run it again. But it would be nice if we can get the running program to report its progress.

We can of course. One of the ways is to use Unix signals. We can use either SIGUSR1 or SIGUSR2, which are reserved for application purpo…

Trivial tools

There are various trivial command-line tools which I (have had to) create because of various reasons. Below are some of them:


I didn't want to write this, but couldn't find any existing cli tool on CPAN or Debian. Since I put reminders on my ~/.bash_profile and I open many many terminals in a day, I needed a way to run some scripts just once a day. It's surprising that I couldn't find a tool to let me do it easily, and I hope someone can correct me on this.


Third-party testing

Unit testing and continuous integration testing are ways to make sure that every change to our code won't break stuffs. We execute our tests after each commit and when we want to release our software.

On the other side of the spectrum, there are things outside our code that change and break our non-changing code. Platforms (like new versions of Perl) and dependencies, for example. Integration testing and CPAN Testers are some of the ways to make sure that dependencies and different versions of Perl still work with our software. We must do this testing regularly even when we're not cha…

Things we don't have #2

About this posting series. Previous episodes: #1.

This time we're going to look at virtual filesystems. Perl currently seems to lack in this area compared to some other languages. There are no support for accessing or creating the various VFS's out there from Perl, except for Fuse.

First, KDE's KIO (KIO slaves). There are many slaves available, from…

So you'd like to ... do offline development and testing

[This post will be imported to cpanlists.org once the service is ready]

Do you want to develop your Perl project on your PC or laptop, without having to be constantly connected to the Internet? Then follow this simple guide.

Creating a CPAN mirror

First you'll want an offline CPAN mirror, where most of the useful Perl modules reside. There is already a document explaining how to do this, so go read it. At the time of this writing (Feb 2014), a full CPAN mirror stands at +- 16GB. Chances are you don't need a fu…

About Steven Haryanto

user-pic A programmer (mostly Perl 5 nowadays). My CPAN ID: SHARYANTO. I'm sedusedan on perlmonks. My twitter is stevenharyanto (but I don't tweet much). Follow me on github: sharyanto.