From 2646514ce6c0f04df6dabc617526ba0e6296c911 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 9 Oct 2012 23:20:04 -0500 Subject: make this private --- lib/MooseX/Meta/TypeConstraint/Doctype.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') 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]") -- cgit v1.2.3