reworked gatherer to be more flexible, added sudo support
[scpubgit/System-Introspector.git] / lib / System / Introspector / Gatherer / Bridge.pm
1 package System::Introspector::Gatherer::Bridge;
2 use Object::Remote;
3 use Object::Remote::Future;
4 use Moo;
5
6 has remote_spec => (is => 'ro', required => 1);
7 has remote_class => (is => 'ro', required => 1);
8 has remote => (is => 'lazy');
9
10 sub _build_remote {
11     my ($self) = @_;
12     return $self->remote_class->new::on($self->remote_spec);
13 }
14
15 sub gather { (shift)->remote->gather(@_) }
16
17 1;