Skip to content

Instantly share code, notes, and snippets.

@arisawa
Created February 12, 2013 07:59
Show Gist options
  • Save arisawa/4760857 to your computer and use it in GitHub Desktop.
Save arisawa/4760857 to your computer and use it in GitHub Desktop.
Example::Module~0.01
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw/say/;
use File::Slurp qw/read_file/;
use JSON;
my $fname = shift @ARGV || "./carton.lock";
my $carton = decode_json( read_file($fname) );
for my $module (sort keys %{ $carton->{modules} }) {
my $desc = $carton->{modules}->{$module};
say join "~", $module, $desc->{version};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment