It can be done, but it's tricky. Here's a script that I wrote to
test Module::Install and ExtUtils::MakeMaker.
#!/usr/bin/perl -l
use strict;
use warnings;
$|=1;
open STDOUT, '>-';
system("xterm -e cpan -ft Module::Install &");
close STDOUT;
use CPAN;
CPAN::Shell->test("ExtUtils::MakeMaker");
Update: The script requires a lot of RAM, so it may or may not work for you.
Try some other commands until it works.
Update: This will probably work better for you.
#!/usr/bin/perl -l
use strict;
use warnings;
$| =1;
open STDOUT, '>-';
system("du /usr/lib/perl5 &");
close STDOUT;
open STDOUT, '>-';
system("xterm -e du /usr/lib/perl5 &");
close STDOUT;
|