4 ###APPDATE: 2009-02-23 00:48:38
12 #ENV variable MUST be defined somewhere,
13 #FOR perl to search modules from,
15 use lib
$ENV{XR_PERL_MODULE_DIR
};
17 use MyPlace
::Script
::Usage qw
/help_required help_even_empty/;
18 exit 0 if(help_required
($0,@ARGV));
19 #exit 0 if(help_even_empty($0,@ARGV));
20 use MyPlace
::ReEnterable
;
21 my $hnd = MyPlace
::ReEnterable
->new('main');
25 my $r=system($cmd,@_);
30 if($hnd->{lastStack
}) {
31 $hnd->pushStack(@
{$hnd->{lastStack
}});
33 $hnd->saveToFile(".r-run.resume");
40 unless($hnd->loadFromFile(".r-run.resume")) {
42 $hnd->pushStack(undef,'process',"echo",$_);
44 $hnd->pushStack(undef,'process','ls','-a','-l');
45 $hnd->pushStack(undef,'process','cat');
46 $hnd->pushStack(undef,'process','help');
49 print STDERR
"Loading resume...\n";
51 until($hnd->isEmpty) {
54 unlink ".r-run.resume";