1Declare::Constraints::SUismeprleC:o:nRtersiublutt(e3d)PDeercllaDroec:u:mCeonntsattriaoinnts::Simple::Result(3)
2
3
4
6 Declare::Constraints::Simple::Result - Validation Result
7
9 my $result = $constraint->($value);
10
11 my $message = $result->message;
12 my $path = $result->path;
13
15 This represents a result returned by a Declare::Constraints::Simple
16 constraint. Objects of this kind overload their boolean context, so the
17 value of the is_valid() accessor is reflected to it.
18
20 new()
21
22 Constructor. As you will mostly just receive result objects, you should
23 never be required to call this yourself.
24
25 set_valid($bool)
26
27 Sets the results validity flag.
28
29 is_valid()
30
31 Boolean accessor telling if this is a true result or not.
32
33 set_message($message)
34
35 The error message. Useful only on non-valid results.
36
37 message()
38
39 Returns the message of the result object.
40
41 add_to_stack($constraint_name)
42
43 This adds another level at the beginning (!) of the results constraint
44 stack. This is mostly intended to use for the "prepare_generator"method
45 in Declare::Constraints::Simple::Library package.
46
47 path([$separator])
48
49 Returns a string containing the stack() contents joined together by the
50 $separator string (defaulting to ".").
51
52 stack()
53
54 Returns an array reference containing the results currrent stack. This
55 is a list of the constraints path parts. This is usually just the con‐
56 straints name. If there's additional info, it is appended to the name
57 like "[$info]".
58
60 Declare::Constraints::Simple
61
63 Robert 'phaylon' Sedlacek "<phaylon@dunkelheit.at>"
64
66 This module is free software, you can redistribute it and/or modify it
67 under the same terms as perl itself.
68
69
70
71perl v5.8.8 2006-0D9e-c1l1are::Constraints::Simple::Result(3)