Perl 5 Porters Mailing List Summary: September 12th-28th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past two weeks. Enjoy!

Introducing Git::Database

Git::Database is yet another module I wrote to interact with Git. It wraps an OO-layer around Git objects (blobs, trees, commits, tags), in a way that's very similar to what Git::PurePerl does. It has no opinion on the actual means to get the data from the Git object database: that bit is done with the Perl Git wrapper of your choice.

At the moment, there's only one supported wrapper for fetching data from Git: my own Git::Repository. I already have branches with working code (i.e. passing all the relevant tests) for Git::Wrapper, Git::Sub, Git::PurePerl and even the venerable, which I'll publish when they are more feature-complete. Git::Class is missing some critical feature I need to get the data from Git, and I couldn't figure out how to get the data using Git::Raw. Patches welcome!

The release is a version 0.001, as I expect the interface to have some rough edges that need some polishing. Depending on the feedback I receive, a version 1.000 should appear in a few months.

PRC 2016 - Third Trimester

Here I am again making a summary of my work during the third trimester of my second year on the CPAN Pull Request Challenge:

Tattletale Variables

Sometimes you might be faced with a huge program that, somewhere, is changing a variable's value to something undesired.

Oh column, where art thou?

When ramiroencinas added FileSystem::Capacity::VolumesInfo to Perl 6 ecosystem I've spotted that it has no macOS support. And while trying to contribute to this module I've discovered how less known Perl 6 features can save the day. What FileSystem::Capacity::VolumesInfo module does is parsing output from df command, which looks like this:

$ df -k -P
Filesystem                                  1024-blocks       Used Available Capacity  Mounted on
/dev/disk3                                   1219749248  341555644 877937604    29%    /
devfs                                               343        343         0   100%    /dev
/dev/disk1s4                                  133638140  101950628  31687512    77%    /Volumes/Untitled
map -hosts                                            0          0         0   100%    /net
map auto_home                                         0          0         0   100%    /home
map -fstab                                            0          0         0   100%    /Network/Servers
//Pawel%20Pabian@biala-skrzynka.local./Data  1951417392 1837064992 114352400    95%    /Volumes/Data
/dev/disk5s2                                 1951081480 1836761848 114319632    95%    /Volumes/Time Machine Backups
bbkr@localhost:/Users/bbkr/foo 123           1219749248  341555644 877937604    29%    /Volumes/osxfuse

(if you see wrapped or trimmed output check raw one here)

And while this looks nice for humans, it is tough task for parser.

TPF at OSCON London

Update: OSCON have supplied us with a discount code for unlimited free Pavillon Plus passes to members of Perl related organisations and the broader community. Just use the code: FREEORG. Use this code when registering for the Pavillion Plus pass and it will zero out the balance. You can register at: - thanks to OSCON and O'Reilly for providing this.

This year OSCON, Europe, will be held in London between the 17th-18th October (with a training day on the 19th), the Perl Foundation will once again have a table in the not-for-profit pavilion. As at previous events volunteers will be manning the Perl stand throughout the day on the Monday and Tuesday and they will also be available in the early evening.

CPAN Tutorials

Almost a year ago, I wrote CPAN tutorials. It isn't an original work, it's a derivative of RubyGems Guides, only "translated" to Perl world. I failed to publish it anywhere until now. I'll be happy if anyone finds it useful in any way which the license allows. And I'll be even happier if I get any feedback.

And here it is:

FASTQ to FASTQ with Perl 6

#!/usr/bin/env perl6

sub MAIN (:$out-dir="", *@fastq) {
    if ($out-dir.chars > 0 && ! $out-dir.IO.d) {
        mkdir $out-dir;

    my $i = 0;
    for @fastq -> $fastq {
        (my $basename = $fastq.IO.basename) ~~ s/\.\w*?$//;
        my $out-file = $*SPEC.catfile(
            $out-dir || $fastq.IO.dirname, $basename ~ '.fa');
        printf "%3d: %s -> %s\n",
            ++$i, $fastq.IO.basename, $out-file;
        my $out-fh   = open $out-file, :w;

        for $fastq.IO.lines -> $header, $seq, $break, $qual {
            # skip first "@"
            $out-fh.print('>' ~ $header.substr(1) ~ "\n");

    put "Done.";

The FASTQ format is one of the worst conceived in the history of bioinformatics, and that's saying something. The only sane FASTQ format uses 4 lines per sequence: a header starting with an "@" sign, the sequence, the header repeated but starting with a "+" (or just the "+"), and the quality score (in either phred 33 or 40). Here's a sample:

@HWI-ST885:65:C07WUACXX:7:2302:1866:196007 1:N:0:GCCAAT

What I thought would be fun to show off here is that you can read the contents of a list into more than one variable. Here I'd like to read four lines at a time, so I just read "lines" into four variables. How simple!

About is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.