aboutsummaryrefslogtreecommitdiff
path: root/t/ConfigSpec.pm
blob: b94c1df19695bb3bb676ea0fa87e6fa72e9eb27f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package ConfigSpec;
use parent 'TestConfig';

sub _check_abs_name {
    my ($self, $valref, $prev_value, $locus) = @_;
    unless ($$valref =~ m{^/}) {
	$self->error("not an absolute pathname", locus => $locus);
	return 0;
    }
    1;
}
	
1;
__DATA__
[core]   
    base = STRING :mandatory null
    number = NUMBER :array
    size = STRING :re='\d+(?:(?i) *[kmg])'
    enable = BOOL
[load]
    file = STRING :check=_check_abs_name :mandatory
    ANY = STRING
  

Return to:

Send suggestions and report system problems to the System administrator.