an eddy in the bitstream

Month: October 2007 (Page 2 of 2)

More secret code: yamllint

Here’s a script I use to test the validy of a .yml (YAML) file.

#!/usr/bin/perl use strict; use warnings; use YAML::Syck; use Data::Dump qw( dump ); use Getopt::Std; our ($opt_d); getopts(‘d’); for my $file (@ARGV) { print “checking $file …”; my $buf = LoadFile($file); print “ok\n”; print( dump($buf), “\n” ) if $opt_d; }
Newer posts »

© 2024 peknet

Theme by Anders NorenUp ↑