summaryrefslogtreecommitdiffabout
path: root/t/ConfigSpec.pm
blob: 30812edf885d74c9a2581ca4999cad21e9578d38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
    ANY = STRING
  

Return to:

Send suggestions and report system problems to the System administrator.