diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-09 23:20:04 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-09 23:20:04 -0500 |
commit | 2646514ce6c0f04df6dabc617526ba0e6296c911 (patch) | |
tree | 648de54b289d00e28ee776a3ce994b48b2bfec1d /lib/MooseX | |
parent | 475181f3ea5e4525c76d84303d66de99eafbfccb (diff) | |
download | moosex-validation-doctypes-2646514ce6c0f04df6dabc617526ba0e6296c911.tar.gz moosex-validation-doctypes-2646514ce6c0f04df6dabc617526ba0e6296c911.zip |
make this private
Diffstat (limited to 'lib/MooseX')
-rw-r--r-- | lib/MooseX/Meta/TypeConstraint/Doctype.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/MooseX/Meta/TypeConstraint/Doctype.pm b/lib/MooseX/Meta/TypeConstraint/Doctype.pm index 9502424..03b5712 100644 --- a/lib/MooseX/Meta/TypeConstraint/Doctype.pm +++ b/lib/MooseX/Meta/TypeConstraint/Doctype.pm @@ -62,18 +62,18 @@ has '+constraint' => ( lazy => 1, default => sub { weaken(my $self = shift); - return sub { !$self->validate_doctype($_) }; + return sub { !$self->_validate_doctype($_) }; }, ); has '+message' => ( default => sub { weaken(my $self = shift); - return sub { $self->validate_doctype($_) }; + return sub { $self->_validate_doctype($_) }; }, ); -sub validate_doctype { +sub _validate_doctype { my $self = shift; my ($data, $doctype, $prefix) = @_; @@ -91,7 +91,7 @@ sub validate_doctype { } else { for my $key (keys %$doctype) { - my $sub_errors = $self->validate_doctype( + my $sub_errors = $self->_validate_doctype( $data->{$key}, $doctype->{$key}, join('.', (length($prefix) ? $prefix : ()), $key) @@ -121,7 +121,7 @@ sub validate_doctype { } else { for my $i (0..$#$doctype) { - my $sub_errors = $self->validate_doctype( + my $sub_errors = $self->_validate_doctype( $data->[$i], $doctype->[$i], join('.', (length($prefix) ? $prefix : ()), "[$i]") |