Perl: Use of “flock”

This is a small example on flock. It may help you to prevent multiple running instances of the same script. Assume you run the script via cron and it may not be finished when cron attempts to start it again. This few lines of code solve this issue.

Continue reading Perl: Use of “flock”

Portage: Patch existing Perl module ebuild by using a overlay

You may have had the same issue as i some time ago. You install a perl module from Portage but you have to modify the module’s code. Of course you don’t want to patch and install manually. Assuming the module is named “foobar” here’s how i solved it:

Continue reading Portage: Patch existing Perl module ebuild by using a overlay