4 use POSIX
qw{:errno_h
};
8 eval { mkdir $dir; }; die if $@
&& $@
->errno != EEXIST
;
11 my $js = decode_json
<STDIN
>;
14 open $fh, ">", "$dir/$e->{name}.css";
15 print $fh "/* -*-css-*- */\n";
16 for my $s ($e->{sections
}->@
*) {
17 KEY
: for my $k (keys %$s) {
18 next KEY
if $k eq "code";
19 print $fh "/*@ $k: ", join(", ", $s->{$k}->@*), " */\n";
21 $s->{code
} =~ s/\n$//;
22 print $fh $s->{code
}, "\n";
23 print $fh "/*\@END*/\n";