Created
February 12, 2013 07:59
-
-
Save arisawa/4760857 to your computer and use it in GitHub Desktop.
Example::Module~0.01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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