summaryrefslogtreecommitdiffabout
path: root/t/ConfigSpec.pm
blob: 3963d83aeb1081b85688fe76fc9e0a913e2e34b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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])'
[load]
    file = STRING :check=_check_abs_name :mandatory
[load ANY param:mandatory]    
    mode = OCTAL
    owner = STRING

  

Return to:

Send suggestions and report system problems to the System administrator.