aboutsummaryrefslogtreecommitdiff
path: root/t/ConfigSpec.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/ConfigSpec.pm')
-rw-r--r--t/ConfigSpec.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/ConfigSpec.pm b/t/ConfigSpec.pm
new file mode 100644
index 0000000..3963d83
--- /dev/null
+++ b/t/ConfigSpec.pm
@@ -0,0 +1,25 @@
1package ConfigSpec;
2use parent 'TestConfig';
3
4sub _check_abs_name {
5 my ($self, $valref, $prev_value, $locus) = @_;
6 unless ($$valref =~ m{^/}) {
7 $self->error("not an absolute pathname", locus => $locus);
8 return 0;
9 }
10 1;
11}
12
131;
14__DATA__
15[core]
16 base = STRING :mandatory null
17 number = NUMBER :array
18 size = STRING :re='\d+(?:(?i) *[kmg])'
19[load]
20 file = STRING :check=_check_abs_name :mandatory
21[load ANY param:mandatory]
22 mode = OCTAL
23 owner = STRING
24
25

Return to:

Send suggestions and report system problems to the System administrator.