Skip to content

Instantly share code, notes, and snippets.

@leedo
Created July 20, 2009 20:00
Show Gist options
  • Save leedo/150854 to your computer and use it in GitHub Desktop.
Save leedo/150854 to your computer and use it in GitHub Desktop.
sub _serverName {
my $self = shift;
my $row = shift;
return (length($row->{'inventory_tag'})
? $row->{'inventory_tag'}
: (length($row->{'hostname'})
? $row->{'hostname'}
: (length($row->{'rack_id'})
? $row->{'rack_id'}
: (length($row->{'nickname'})
? $row->{'nickname'}
: $row->{'id'}))));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment