Data::Validate::Struct - Validate recursive Hash Structures https://metacpan.org/pod/Data::Validate::Struct
  • Perl 96.4%
  • Shell 3.6%
Find a file
Thomas von Dein c4b1344fed
All checks were successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/build/5 Pipeline was successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
no 5.22
2025-12-14 21:02:55 +01:00
.github/workflows add gh action running ci 2023-03-22 10:31:32 +01:00
.woodpecker no 5.22 2025-12-14 21:02:55 +01:00
t move to codeberg (#9) 2025-12-13 20:48:57 +01:00
Changelog bump version 2023-03-22 12:56:34 +01:00
cpanfile added 2016-06-02 13:35:11 +02:00
Makefile.PL move to codeberg (#9) 2025-12-13 20:48:57 +01:00
MANIFEST removed files from git maintained by "make dist" 2015-01-23 09:32:27 +01:00
META.json move to codeberg (#9) 2025-12-13 20:48:57 +01:00
META.yml move to codeberg (#9) 2025-12-13 20:48:57 +01:00
README.md move to codeberg (#9) 2025-12-13 20:48:57 +01:00
Struct.pm bump version 2023-03-22 12:56:34 +01:00

status-badge

Data::Validate::Struct - Validate recursive Hash Structures

SYNOPSIS

 use Data::Validate::Struct;
 my $validator = new Data::Validate::Struct($reference);
 if ( $validator->validate($config_hash_reference) ) {
   print "valid\n";
 }
 else {
   print "invalid " . $validator->errstr() . "\n";
 }

DESCRIPTION

This module validates a config hash reference against a given hash structure in contrast to Data::Validate in which you have to check each value separately using certain methods.

This hash could be the result of a config parser or just any hash structure. Eg. the hash returned by XML::Simple could be validated using this module. You may also use it to validate CGI input, just fetch the input data from CGI, map it to a hash and validate it.

Data::Validate::Struct uses some of the methods exported by Data::Validate, so you need to install it too.

INSTALLATION

to install, type:

perl Makefile.PL
make
make test
make install

to read the complete documentation, type:

perldoc Data::Validate::Struct

LICENSE AND COPYRIGHT

Copyright (c) 2007-2015 T. v.Dein

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