Skip to content

Commit

Permalink
more meta options
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Feb 9, 2022
1 parent ba4ff66 commit fe808b0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions sbSchemaParser.pl
Original file line number Diff line number Diff line change
Expand Up @@ -183,21 +183,21 @@ sub _process_yaml {
TODO: merge meta entries
=cut

if ( defined $config->{defaults}->{meta_header} ) {
$data->{meta} = $config->{defaults}->{meta_header} }

# the other option is to override the overall meta from a schema_repo specific
# file
if ( defined $paths->{meta_header_filename} ) {
if ( $paths->{meta_header_filename} =~ /\w\.\w/ ) {
if (-f $paths->{meta_header_filename}) {
my $meta = LoadFile(
catfile(
$config->{dir_path},
$paths->{meta_header_filename}
)
);
my $mf = catfile( $config->{dir_path}, $paths->{meta_header_filename} );
if (-f $mf) {
my $meta = LoadFile($mf);
$data->{meta} = $meta->{meta};
} else {
push(@warnings, '!!! No correct meta header file in '.$paths->{meta_header_filename}.'!') }
}
} elsif ( defined $config->{defaults}->{meta_header} ) {
$data->{meta} = $config->{defaults}->{meta_header} }
}

=podmd
The class name is derived from the file's "$id" value, assuming a canonical
Expand Down

0 comments on commit fe808b0

Please sign in to comment.