Skip to content

Commit

Permalink
validate_attribute: use _find_attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
rsrchboy committed Dec 24, 2014
1 parent db9ad5f commit 4c5e4fc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Test/Moose/More.pm
Expand Up @@ -447,9 +447,8 @@ sub validate_attribute {
my ($thing, $name, %opts) = @_;

local $Test::Builder::Level = $Test::Builder::Level + 1;
has_attribute_ok($thing, $name);
my $att = find_meta($thing)->get_attribute($name)
or return;
return unless has_attribute_ok($thing, $name);
my $att = _find_attribute($thing => $name);

return _validate_attribute($att, %opts);
}
Expand Down

0 comments on commit 4c5e4fc

Please sign in to comment.