capture origin/<name> of active branch in case remote is not tracked
[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_args => (is => 'ro', required => 1);
9 has remote => (is => 'lazy');
10
11 sub _build_remote {
12     my ($self) = @_;
13     return $self->remote_class
14         ->new::on($self->remote_spec, $self->remote_args);
15 }
16
17 sub gather { (shift)->remote->gather(@_) }
18
19 1;
20
21 __END__
22
23 =head1 NAME
24
25 System::Introspector::Gatherer::Bridge - Bridged Connections
26
27 =head1 SEE ALSO
28
29 =over
30
31 =item L<System::Introspector>
32
33 =back
34
35 =head1 COPYRIGHT
36
37 Copyright (c) 2012 the L<System::Introspector>
38 L<AUTHOR|System::Introspector/AUTHOR>,
39 L<CONTRIBUTORS|System::Introspector/CONTRIBUTORS> and
40 L<SPONSORS|System::Introspector/SPONSORS>.
41
42 =head1 LICENSE
43
44 This library is free software and may be distributed under the same terms
45 as perl itself.
46
47 =cut