Skip to content

Commit dca14b3

Browse files
author
Ovid
committed
Base code
0 parents  commit dca14b3

File tree

92 files changed

+16680
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+16680
-0
lines changed

Changes

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Revision history for Data-Checks
2+
3+
0.000001 Mon Jan 9 02:58:57 2023
4+
Initial release.
5+
6+
7+
8+
0.002 Thu Apr 6 10:03:57 2023
9+
No changes logged

MANIFEST

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Changes
2+
lib/Data/Checks.pm
3+
lib/Data/Checks/CheckPragmaSim.pm
4+
Makefile.PL
5+
MANIFEST
6+
README
7+
t/00.load.t
8+
t/array_var.t
9+
t/array_var_len.t
10+
t/array_var_len_nonrange.t
11+
t/array_var_len_nonzero.t
12+
t/check_ANY.t
13+
t/check_ARRAY.t
14+
t/check_ARRAY_ARRAY_INT_REF.t
15+
t/check_ARRAY_INT.t
16+
t/check_ARRAY_LEN.t
17+
t/check_ARRAY_LEN_RANGE.t
18+
t/check_BOOL.t
19+
t/check_CAN.t
20+
t/check_CHECK.t
21+
t/check_CLASS.t
22+
t/check_CLASS_named.t
23+
t/check_CODE.t
24+
t/check_DEF.t
25+
t/check_DICT.t
26+
t/check_DICT_ETC.t
27+
t/check_DICT_OPT.t
28+
t/check_DICT_OPT_ETC.t
29+
t/check_DOES.t
30+
t/check_GLOB.t
31+
t/check_HANDLE.t
32+
t/check_HASH.t
33+
t/check_HASH_ARRAY_UINT_CODE.t
34+
t/check_HASH_NUM_UINT.t
35+
t/check_HASH_NUM_UINT_REF_NOT_ARRAY.t
36+
t/check_HASH_UINT.t
37+
t/check_INT.t
38+
t/check_INT_or_VOID.t
39+
t/check_INT_various.t
40+
t/check_ISA.t
41+
t/check_LIST.t
42+
t/check_LIST_HASH_or_INT.t
43+
t/check_LIST_NUM_length.t
44+
t/check_LIST_or_INT.t
45+
t/check_NONREF.t
46+
t/check_NUM.t
47+
t/check_NUM_-1..1.t
48+
t/check_NUM_0..1.t
49+
t/check_NUM_0..99.t
50+
t/check_NUM_0..inf.t
51+
t/check_OBJ.t
52+
t/check_OBJ_named.t
53+
t/check_OP.t
54+
t/check_OPT_ETC.t
55+
t/check_OPT_REP.t
56+
t/check_REF.t
57+
t/check_REF_various.t
58+
t/check_REGEXP.t
59+
t/check_REP.t
60+
t/check_REP_multi.t
61+
t/check_REP_single.t
62+
t/check_ROLE.t
63+
t/check_ROLE_named.t
64+
t/check_SCALAR.t
65+
t/check_SEQ_OPT_ETC.t
66+
t/check_STR.t
67+
t/check_STR_various.t
68+
t/check_TUPLE.t
69+
t/check_TUPLE_OPT.t
70+
t/check_TUPLE_OPT_ETC.t
71+
t/check_UINT.t
72+
t/check_UINT_various.t
73+
t/check_UNDEF.t
74+
t/check_VOID.t
75+
t/check_VSTR.t
76+
t/expressions.t
77+
t/fatal_nonfatal.t
78+
t/hash_var.t
79+
t/hash_var_keycheck.t
80+
t/heterogeneous_decl.t
81+
t/minus_capital_K.t
82+
t/minus_small_k.t
83+
t/no_checks.t
84+
t/no_checks_permanent.t
85+
t/nonfatal.t
86+
t/state_array_var.t
87+
t/state_array_var_pre5.28.t
88+
t/state_hash_var.t
89+
t/state_hash_var_pre5.28.t
90+
t/tlib/Data/Checks/TestUtils.pm
91+
META.yml Module YAML meta-data (added by MakeMaker)
92+
META.json Module JSON meta-data (added by MakeMaker)

META.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"abstract" : "Declarative data validation for variables and subroutines",
3+
"author" : [
4+
"Damian Conway <[email protected]>"
5+
],
6+
"dynamic_config" : 1,
7+
"generated_by" : "ExtUtils::MakeMaker version 7.64, CPAN::Meta::Converter version 2.150010",
8+
"license" : [
9+
"artistic_2"
10+
],
11+
"meta-spec" : {
12+
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
13+
"version" : 2
14+
},
15+
"name" : "Data-Checks",
16+
"no_index" : {
17+
"directory" : [
18+
"t",
19+
"inc"
20+
]
21+
},
22+
"prereqs" : {
23+
"build" : {
24+
"requires" : {
25+
"ExtUtils::MakeMaker" : "0"
26+
}
27+
},
28+
"configure" : {
29+
"requires" : {
30+
"ExtUtils::MakeMaker" : "0"
31+
}
32+
},
33+
"runtime" : {
34+
"requires" : {
35+
"PPR" : "0.001004",
36+
"Test::More" : "0",
37+
"Variable::Magic" : "0.63",
38+
"perl" : "5.022"
39+
}
40+
}
41+
},
42+
"release_status" : "stable",
43+
"version" : "0.000001",
44+
"x_serialization_backend" : "JSON::PP version 4.10"
45+
}

META.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
abstract: 'Declarative data validation for variables and subroutines'
3+
author:
4+
- 'Damian Conway <[email protected]>'
5+
build_requires:
6+
ExtUtils::MakeMaker: '0'
7+
configure_requires:
8+
ExtUtils::MakeMaker: '0'
9+
dynamic_config: 1
10+
generated_by: 'ExtUtils::MakeMaker version 7.64, CPAN::Meta::Converter version 2.150010'
11+
license: artistic_2
12+
meta-spec:
13+
url: http://module-build.sourceforge.net/META-spec-v1.4.html
14+
version: '1.4'
15+
name: Data-Checks
16+
no_index:
17+
directory:
18+
- t
19+
- inc
20+
requires:
21+
PPR: '0.001004'
22+
Test::More: '0'
23+
Variable::Magic: '0.63'
24+
perl: '5.022'
25+
version: '0.000001'
26+
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

Makefile.PL

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
use strict;
2+
use warnings;
3+
use ExtUtils::MakeMaker;
4+
5+
WriteMakefile(
6+
NAME => 'Data::Checks',
7+
AUTHOR => 'Damian Conway <[email protected]>',
8+
VERSION_FROM => 'lib/Data/Checks.pm',
9+
ABSTRACT_FROM => 'lib/Data/Checks.pm',
10+
PL_FILES => {},
11+
LICENSE => 'artistic2',
12+
MIN_PERL_VERSION => 5.022,
13+
PREREQ_PM => {
14+
'Test::More' => 0,
15+
'PPR' => 0.001004,
16+
'Variable::Magic' => 0.63,
17+
},
18+
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
19+
clean => { FILES => 'Data-Checks-*' },
20+
);

README

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Data::Checks version 0.002
2+
3+
This is NOT a type system for Perl.
4+
5+
The fundamental problem with type systems is that every individual programmer
6+
knows exactly what they mean by – and want in – and need from – a “type system”
7+
...but no two programmers can ever agree precisely what that is.
8+
9+
What most Perl users actually need is a practical way to ensure that, when a value
10+
that is assigned to a variable, or passed to a parameter, or returned from a
11+
subroutine, that value conforms to the designer’s original expectations and
12+
assumptions (e.g. did their subroutine get passed a positive integer and a
13+
filehandle, and did it return a reference to a hash of strings?)
14+
15+
So this is not a compile-time type-system for Perl.
16+
It’s a runtime data-checking system for Perl: a system of “checks”.
17+
18+
A check is an assertion about the value(s) that can be assigned to a variable,
19+
passed to a parameter, or returned by a subroutine. This module provides
20+
a large number of built-in checks and will eventually offer a mechanism
21+
for specifying user-defined checks as well.
22+
23+
24+
INSTALLATION
25+
26+
To install this module, run the following commands:
27+
28+
perl Makefile.PL
29+
make
30+
make test
31+
make install
32+
33+
34+
DEPENDENCIES
35+
36+
Requires Perl 5.22 or later.
37+
38+
Also requires the non-core PPR and Variable::Magic modules.
39+
40+
41+
COPYRIGHT AND LICENCE
42+
43+
Copyright (C) 2023, Damian Conway
44+
45+
This library is free software; you can redistribute it and/or modify
46+
it under the same terms as Perl itself.

0 commit comments

Comments
 (0)