summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-11 14:34:33 -0500
committerJesse Luehrs <doy@tozt.net>2012-10-11 14:34:33 -0500
commit21eb5b1322845b0bf4d882f70b718367f7821580 (patch)
tree4b2bbc3e8686925d1dafc19d34ab79b3130d7b34 /lib
parentcd59caeec925cf0bf8625d567a442e3c46ae7475 (diff)
downloadmoosex-validation-doctypes-21eb5b1322845b0bf4d882f70b718367f7821580.tar.gz
moosex-validation-doctypes-21eb5b1322845b0bf4d882f70b718367f7821580.zip
docs
Diffstat (limited to 'lib')
-rw-r--r--lib/MooseX/Validation/Doctypes/Errors.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/MooseX/Validation/Doctypes/Errors.pm b/lib/MooseX/Validation/Doctypes/Errors.pm
index 7601855..9da6f91 100644
--- a/lib/MooseX/Validation/Doctypes/Errors.pm
+++ b/lib/MooseX/Validation/Doctypes/Errors.pm
@@ -106,6 +106,14 @@ has extra_data => (
predicate => 'has_extra_data',
);
+=method TO_JSON
+
+Returns a hashref with keys of C<errors> and C<extra_data>, containing the
+values of those attributes. This allows L<JSON> to properly encode the error
+object.
+
+=cut
+
sub TO_JSON {
my $self = shift;
@@ -115,6 +123,13 @@ sub TO_JSON {
};
}
+=method stringify
+
+Returns a human-readable string containing the error data in the object. This
+is used for the stringification overload.
+
+=cut
+
sub stringify {
my $self = shift;