If you use MongoDB and Perl, I want your feedback!

With the release of the v1.0 MongoDB Perl driver, I'm starting to sketch out a roadmap for future development and I'd like to hear from anyone using MongoDB and Perl together.

How can you help?

  1. Please take a few minutes to fill out the MongoDB Developer Experience Survey.

    This survey covers all languages that MongoDB supports in-house. In the past, there have been few responses from Perl developers and I'd like to change that.

  2. Please click the "++" button on the MetaCPAN MongoDB Release page.

    Because there are no download statistics for CPAN, gauging community interest is challenging and this is one – albeit crude – metric I (and my bosses!) can look at over time.

  3. Please file a JIRA ticket for any bugs or feature requests you have.

    If you absolutely can't stand to deal with JIRA, you can email me directly and I'll put it in JIRA for you.

  4. Please promote your work! Blog about it, tweet about, give talks, etc.

    Don't let the "hip" languages be the only ones people think of for big data and NoSQL development.

Why is giving feedback so important?

MongoDB is one of the only next-gen databases to support Perl in-house.

Your feedback helps demonstrate community interest to keep it that way.

Thank you!

Posted in mongodb, perl programming | Tagged , , , | Comments closed

MongoDB Perl Driver v1.0.2 released

The MongoDB Perl driver v1.0.2 has been released on CPAN.

This is a stable bugfix release. Changes include:

  • PERL-198 Validate user-constructed MongoDB::OID objects.
  • PERL-495 Preserve fractional seconds when using dt_type 'raw'.
  • PERL-571 Include limits.h explicitly.
  • PERL-526 Detect stale primaries by election_id (only supported by MongoDB 3.0 or later).
  • PERL-575 Copy inflated booleans instead of aliasing them.

Please see the Changes file if you wish additional detail.

We always appreciate feedback from the user community. Please submit comments, bug reports and feature requests via JIRA.

NOTE: If you use the MongoDB Perl driver, please click the "++" button on the MongoDB release page.

Posted in mongodb | Tagged , , | Comments closed

My Github name has changed from dagolden to xdg

For a long time, my Github identity matched my CPAN ID and I was 'dagolden' on Github. Today, I'm switching to be 'xdg' on Github, to match my Twitter and IRC handles.

The 'dagolden' Github account has become an organization to avoid breaking links and avoid the pain of manually migrating 100's of repositories.

So, henceforth, if you want to highlight me on Github, use "@xdg", not "@dagolden".

Posted in meta | Tagged , , | Comments closed

How to trim PDF margins and edit metadata

I often download academic articles as PDFs to read later. I regularly find two really annoying problems:

  1. Huge margins make the PDF nearly unreadable on my Kindle Fire
  2. Title and authors are missing from PDF metadata, making them harder to find later via search

Today, I found an answer to the first and wrote an answer to the second.

For fixing huge margins, I found the free briss tool, which shows a composite image of all odd and even pages and lets you set a crop box around them.

briss in action cropping PDF margins

briss in action cropping PDF margins

To fix the metadata, I did a bit of Googling for tools, then realized I could whip up a tool with Perl and PDF::API2 faster than hunting for an existing one.

This program reads PDF metadata, opens an editor with the data in JSON format, and takes the result and saves it to a new PDF.

#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;

use JSON::MaybeXS;
use PDF::API2;
use Path::Tiny;

die "Usage: $0 <infile> <outfile>\n" unless @ARGV == 2;

my ( $infile, $outfile ) = @ARGV;

unless ( $infile || -r $infile ) {
    die "Input file '$infile' can't be read\n";
}

my $pdf = PDF::API2->open($infile);
my $json = JSON::MaybeXS->new( utf8 => 1, pretty => 1 );
my $temp = Path::Tiny->tempfile;
$temp->spew( $json->encode( { $pdf->info } ) );

if ( $ENV{EDITOR} ) {
    system( $ENV{EDITOR}, $temp )
      and die "Error editing temp file: $!\n";
}
else {
    die "No EDITOR environment variable set.\n";
}

$pdf->info( %{ $json->decode( $temp->slurp ) } );
$pdf->saveas($outfile);
Posted in hacks, perl programming | Tagged , , , | Comments closed

MongoDB v1.0.0 released

About to ship v1.0.0
No more release candidates! Earlier this week, with great joy, I shipped MongoDB v1.0.0 to CPAN.

I wrote an article for the MongoDB websiteIntroducing the 1.0 Perl Driver

Also, if you use MongoDB with Perl, I'd greatly appreciate if you could give it a "++" click on MetaCPAN.

Posted in mongodb, perl programming | Tagged , , , | Comments closed