mkdir c:\repos
cd c:\repos
git clone https://github.com/stevieb9/berrybrew
cd berrybrew
bin\berrybrew config # type 'y'
exit
# open new cmd window
berrybrew install 5.24.0_64
berrybrew switch 5.24.0_64
exit
# open new cmd window
cd c:\repos
cpanm Test::BrewBuild
bbtester start
# you can use your own CPAN module below, so long as
# it has a git repo; Test::BrewBuild will take care of
# the details. A small module repro's quicker
git clone https://github.com/stevieb9/file-edit-portable
cd file-edit-portable
bbdispatch -t localhost
####
if ($^O =~ /MSWin/){
$log->_6("on Windows, using work dir $work_dir");
my $t;
for (split /;/, $ENV{PATH}){
if (-x "$_/perl.exe"){
$perl = "$_/perl.exe";
last;
}
}
for (split /;/, $ENV{PATH}){
if (-e "$_/bbtester"){
$t = "$_/bbtester";
last;
}
}
$log->_6("using command: $perl $t --fg");
@args = ($t, '--fg');
}
...
my $bg;
if ($^O =~ /MSWin/){
$bg = Proc::Background->new($perl, @args);
}
else {
$bg = Proc::Background->new(@args);
}
####
internal static void Exec(StrawberryPerl perl, string command, string path_env)
{
Console.WriteLine("Perl-" + perl.Name + "\n==============");
process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
System.Environment.SetEnvironmentVariable(
"PATH",
String.Join(";", perl.PerlPath, path_env)
);
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/c " + perl.PerlPath + @"\" + command;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.UseShellExecute = false;
process.Start();
Console.WriteLine(process.StandardOutput.ReadToEnd());
Console.WriteLine(process.StandardError.ReadToEnd());
process.WaitForExit();
}