Skip to content
Snippets Groups Projects
Commit e39e1efc authored by Robert Anderson's avatar Robert Anderson
Browse files

* Return the raw value for rawattr() and fallback to the translated value if there is no raw value

parent 229145b9
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,11 @@ sub rawattr
my @attr = $self->_attributes;
for (my $i = $#attr; $i >= 0; $i-- ) {
return $attr[$i][2] if $attr[$i][0] eq $name;
# Check if this is the attr we're after
if ($attr[$i][0] eq $name) {
# If it is, return the raw attribute if it exists, else return the nicer dict one
return defined($attr[$i][2]) ? $attr[$i][2] : $attr[$i][1];
}
}
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment