Skip to content

Instantly share code, notes, and snippets.

@krimdomu
Created August 26, 2014 17:51
Show Gist options
  • Save krimdomu/199483a6dc5b8698a0de to your computer and use it in GitHub Desktop.
Save krimdomu/199483a6dc5b8698a0de to your computer and use it in GitHub Desktop.
test yaml for syntax
###
### USAGE: perl test-yaml.pl file.yml
###
use strict;
use warnings;
use Data::Dumper;
use YAML;
if( ! $ARGV[0] ) {
die "No file defined: Usage: test-yaml.pl file.yml";
}
my $f = YAML::LoadFile($ARGV[0]);
print Dumper $f;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment