Changeset 9671
- Timestamp:
- 12/13/09 07:02:10 (2 years ago)
- Location:
- trunk/Debug-Client/t
- Files:
-
- 2 added
- 2 edited
-
09-io.t (added)
-
eg/02-sub.pl (modified) (1 diff)
-
eg/05-io.pl (added)
-
lib/Debugger.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Debug-Client/t/eg/02-sub.pl
r292 r9671 10 10 11 11 12 12 13 sub f { 13 14 my ($q, $w) = @_; -
trunk/Debug-Client/t/lib/Debugger.pm
r9657 r9671 10 10 @ISA = ('Exporter'); 11 11 12 @EXPORT = qw(start_script start_debugger );12 @EXPORT = qw(start_script start_debugger slurp); 13 13 14 14 my $host = 'localhost'; … … 17 17 sub start_script { 18 18 my ($file) = @_; 19 my $dir = tempdir(CLEANUP => 0); 20 my $path = $dir; 21 if ($^O =~ /Win32/i) { 22 require Win32; 23 $path = Win32::GetLongPathName($path); 24 } 25 19 26 my $pid = fork(); 20 my $dir = tempdir(CLEANUP => 1);21 22 27 die if not defined $pid; 23 28 … … 25 30 local $ENV{PERLDB_OPTS} = "RemotePort=$host:$port"; 26 31 sleep 1; 27 exec "$^X -d $file > $dir/out 2> $dir/err"; 32 #warn "path '$path'"; 33 exec qq($^X -d $file > "$path/out" 2> "$path/err"); 28 34 exit 0; 29 35 } … … 39 45 } 40 46 47 sub slurp { 48 my ($file) = @_; 41 49 50 open my $fh, '<', $file or die "Could not open '$file' $!"; 51 local $/ = undef; 52 return <$fh>; 53 } 42 54 1; 43 55
Note: See TracChangeset
for help on using the changeset viewer.
