simulated lsof
[scpubgit/System-Introspector.git] / lib / System / Introspector / Config.pm
index 4ebb33f..98697ab 100644 (file)
@@ -19,6 +19,14 @@ sub groups { keys %{ $_[0]->config->{group} || {} } }
 
 sub has_group { exists $_[0]->config->{group}{ $_[1] } }
 
+sub hosts {
+    my ($self) = @_;
+    my $host_spec = $self->config->{host};
+    return ref($host_spec) ? @$host_spec : $host_spec;
+}
+
+sub user { $_[0]->config->{user} }
+
 my $_get_inherited = sub {
     my $data = shift;
     $data ||= {};