/[Perly]/lib/Perly/Action/Run.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Perly/Action/Run.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 15 by dpavlin, Tue Jun 5 23:23:30 2007 UTC revision 17 by dpavlin, Tue Jun 5 23:45:02 2007 UTC
# Line 74  sub take_action { Line 74  sub take_action {
74    
75          write_file( $code->name, $code->source );          write_file( $code->name, $code->source );
76          chmod 0700, $code->name;          chmod 0700, $code->name;
77            my $cmd = './' . $code->name;
78    
79          write_file( $input->name, $input->content ) if ( $input->content );          if ( $input->content ) {
80                    write_file( $input->name, $input->content );
81          my $cmd = './' . $code->name . ' ' . $input->name;                  $cmd .= ' ' . $input->name;
82                    $self->result->content( input => $input->content );
83            }
84    
85          my $output = `$cmd 2>&1`;          my $output = `$cmd 2>&1`;
86          $output =~ s/^Can't ignore signal CHLD, forcing to default\.\n//s;          $output =~ s/^Can't ignore signal CHLD, forcing to default\.\n//s;
87            $self->result->content( output => $output );
88    
89          my $message = '$ ' . $cmd;          my $message = '$ ' . $cmd;
90    
91            #warn "$message\n$output\n";
92    
93          chdir( $cwd ) || die "can't return to $cwd";          chdir( $cwd ) || die "can't return to $cwd";
94    
95      $self->result->message( $message );      $self->result->message( $message );
96          $self->result->content( output => $output, cmd => $cmd );  
97            #warn "content in action = ",dump( $self->result->content );
98    
99      return 1;      return 1;
100  }  }

Legend:
Removed from v.15  
changed lines
  Added in v.17

  ViewVC Help
Powered by ViewVC 1.1.26