/[cvs]/nfo/perl/libs/Data/Rap/Engine.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Rap/Engine.pm

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

revision 1.10 by joko, Tue May 13 07:56:12 2003 UTC revision 1.12 by jonen, Tue Jun 24 20:59:51 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ## ----------------------------------------------------------------------  ## ----------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.12  2003/06/24 20:59:51  jonen
6    ##  added option 'detach'
7    ##
8    ##  Revision 1.11  2003/06/23 17:54:32  joko
9    ##  prepared execution of in-process perl-code via eval (not activated yet!)
10    ##
11  ##  Revision 1.10  2003/05/13 07:56:12  joko  ##  Revision 1.10  2003/05/13 07:56:12  joko
12  ##  enhanced: *hierarchical* containers for context handling  ##  enhanced: *hierarchical* containers for context handling
13  ##  fixes: some pre-flight checks  ##  fixes: some pre-flight checks
# Line 132  sub perform_details { Line 138  sub perform_details {
138      my $content = $entry->{content};      my $content = $entry->{content};
139      $self->perform_command($command, $args, $content, { warn => 1 } );      $self->perform_command($command, $args, $content, { warn => 1 } );
140      # check recursiveness      # check recursiveness
141      # new condition: don't recurse if node is flagged to have inline-args (2004-04-17)      # new condition: don't recurse if node is flagged to have inline-args (2003-04-17)
142      my $has_inline_args = ($entry->{attrib}->{_args} && $entry->{attrib}->{_args} eq 'inline');      my $has_inline_args = ($entry->{attrib}->{_args} && $entry->{attrib}->{_args} eq 'inline');
143      if ($entry->{content} && ref $entry->{content} && !$has_inline_args) {      if ($entry->{content} && ref $entry->{content} && !$has_inline_args) {
144        $self->perform_details($entry);        $self->perform_details($entry);
145      }      }
146      # new of 2003-05-08      # new of 2003-05-08
147        $command ||= '';
148      $self->perform_command($command . '_end', undef, undef, { warn => 0 } );      $self->perform_command($command . '_end', undef, undef, { warn => 0 } );
149    }    }
150  }  }
# Line 361  sub run_executable { Line 368  sub run_executable {
368    
369    delete $opts->{caption};    delete $opts->{caption};
370    delete $opts->{async};    delete $opts->{async};
371      delete $opts->{detach};
372    
373    #print Dumper($meta);    #print Dumper($meta);
374    
# Line 421  sub run_executable { Line 429  sub run_executable {
429        # V1.b - enhanced: variable local method        # V1.b - enhanced: variable local method
430        $meta->{caption} ||= '';        $meta->{caption} ||= '';
431        $meta->{async} ||= 0;        $meta->{async} ||= 0;
432          $meta->{detach} ||= 0;
433        # new of 2003-05-08: USE_PATH!        # new of 2003-05-08: USE_PATH!
434        $meta->{USE_PATH} ||= 0;        $meta->{USE_PATH} ||= 0;
435        my $evalstr = "run_cmd('$cmd', '$meta->{caption}', { async => $meta->{async}, USE_PATH => $meta->{USE_PATH} });";        my $evalstr = "run_cmd('$cmd', '$meta->{caption}', { async => $meta->{async}, detach => $meta->{detach}, USE_PATH => $meta->{USE_PATH} });";
436        eval($evalstr);        eval($evalstr);
437        #my $res = do "$cmd";        #my $res = do "$cmd";
438        #print $res, "\n" if $res;        #print $res, "\n" if $res;
# Line 478  sub run_script { Line 487  sub run_script {
487            
488    } elsif ($args->{language} eq 'bash') {    } elsif ($args->{language} eq 'bash') {
489      $self->log("FIXME: - - - - - -- - - --  BASH -  - -    -  - -   -    --   - ", 'error');      $self->log("FIXME: - - - - - -- - - --  BASH -  - -    -  - -   -    --   - ", 'error');
490    
491      } elsif ($args->{language} eq 'perl') {
492        
493        # reporting
494        #$self->log("Executing some arbitrary unsigned code (probably unsafe). [language=$args->{language}]", 'info');
495        #$self->log("\n<code>\n$code\n</code>", 'info');
496        
497        # do it
498        #eval($code);
499        #$self->log("\n<code>\n$code\n</code>", 'error') if $@;
500            
501    } else {    } else {
502      $self->log("FIXME: Script language '$args->{language}' not implemented.", 'error');      $self->log("FIXME: Script language '$args->{language}' not implemented.", 'error');

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.12

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed