Commit b46f1f63 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add shortcut method for the domain of the urn.

parent a528684d
......@@ -108,6 +108,10 @@ sub Lookup($$)
# Add to cache.
$authorities{$self->{'AUTHORITY'}->{'uuid'}} = $self;
# Get the domain as a convenience.
my ($domain,undef,undef) = GeniHRN::Parse($self->{'AUTHORITY'}->{'urn'});
$self->{'DOMAIN'} = $domain;
return $self;
}
......@@ -177,6 +181,8 @@ sub url($) { return field($_[0], "url"); }
sub hrn($) { return field($_[0], "hrn"); }
sub type($) { return field($_[0], "type"); }
sub disabled($) { return field($_[0], "disabled"); }
# Convenience.
sub domain($) { return $_[0]->{"DOMAIN"}; }
sub _version_info($) { return $_[0]->{"_version_info"}; }
sub version($) { return $_[0]->VersionInfo()->{"version"}; }
sub apilevel($) { return $_[0]->VersionInfo()->{"apilevel"}; }
......
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