The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Data::Schema::Plugin::LoadSchema::Hash - Plugin to load schemas from hashes

SYNOPSIS

    use Data::Schema;

    # schemas are located in hashes
    my $schemas = {
        even => [int=>{divisible_by=>2}],
    }

    my $ds = Data::Schema->new;
    $ds->register_plugin('Data::Schema::Plugin::LoadSchema::Hash');
    $ds->config->schema_search_path([$schemas]);

METHODS

get_schema($self, $name)

Get schema from hashes, or undef if not found. List of hashes to search from is specified in validator's schema_search_path config variable.

AUTHOR

Steven Haryanto, <steven at masterweb.net>

COPYRIGHT & LICENSE

Copyright 2009 Steven Haryanto, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.