weak_ref => 1,
handles => {
_run_cmd => 'run_cmd',
+ _run_cmd_fh => 'run_cmd_fh',
_run_cmd_list => 'run_cmd_list',
_get_gpp_object => 'get_gpp_object',
},
return $out;
}
+ method run_cmd_fh (@args) {
+ unshift @args, ('--git-dir' => $self->gitdir)
+ if $self->has_project;
+ run [$self->_git, @args],
+ '<pipe', \*IN,
+ '>pipe', \*OUT,
+ '2>pipe', \*ERR
+ or die "cmd returned *?";
+ return \*OUT;
+ }
+
method run_cmd_list (@args) {
my $cmdout = $self->run_cmd(@args);
return $cmdout ? split(/\n/, $cmdout) : ();