File: schemas.pl

package info (click to toggle)
libyaml-pp-perl 0.39.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,636 kB
  • sloc: perl: 14,462; makefile: 15
file content (26 lines) | stat: -rw-r--r-- 530 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin '$Bin';
use lib "$Bin/../lib";

use YAML::PP;

my $tests_perl = require "$Bin/schema-perl.pm";
my $tests_ixhash = require "$Bin/schema-ixhash.pm";

my %tests = (
    %$tests_perl,
    %$tests_ixhash,
);

my %all_data;
for my $name (sort keys %tests) {
    my $test = $tests{ $name };
    my $data = eval $test->[0];
    $all_data{ $name } = $data;
}

my $yp = YAML::PP->new( schema => [qw/ JSON Perl Tie::IxHash /] );
my $yaml = $yp->dump_string(\%all_data);
print $yaml;