Commit 4585d464 authored by Leigh B Stoller's avatar Leigh B Stoller

Add utility function.

parent 6f3ea866
......@@ -301,6 +301,14 @@ AUTOLOAD {
carp("No such slot '$name' field in class $type");
return undef;
sub field($$) {
my ($self, $name) = @_;
if (exists($self->{'IMAGE'}->{$name})) {
return $self->{'IMAGE'}->{$name};
return undef;
# Break circular reference someplace to avoid exit errors.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment