/[cvs]/nfo/perl/scripts/shortcuts/rap.pl
ViewVC logotype

Diff of /nfo/perl/scripts/shortcuts/rap.pl

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

revision 1.3 by joko, Thu Feb 20 21:39:49 2003 UTC revision 1.5 by joko, Sat Mar 29 06:54:59 2003 UTC
# Line 4  Line 4 
4  ##  $Id$  ##  $Id$
5  ## -------------------------------------------------------------------------  ## -------------------------------------------------------------------------
6  ##  $Log$  ##  $Log$
7    ##  Revision 1.5  2003/03/29 06:54:59  joko
8    ##  + sub rap_boot
9    ##
10    ##  Revision 1.4  2003/03/27 15:58:08  joko
11    ##  enhancement: now can execute perl-programs via 'do' here
12    ##
13  ##  Revision 1.3  2003/02/20 21:39:49  joko  ##  Revision 1.3  2003/02/20 21:39:49  joko
14  ##  - find_rules moved to Rap.pm  ##  - find_rules moved to Rap.pm
15  ##  ##
# Line 61  use Data::Rap; Line 67  use Data::Rap;
67    
68  sub main {  sub main {
69    my $argString = shift;    my $argString = shift;
70    my $rap = Data::Rap->new( target => $argString );    
71    $rap->start();    # check if target is a namespace-string (contains '::')
72    #$rap->stop();    # TODO: move this logic/code to inside Data::Rap!
73      if ($argString =~ s/::/\//g) {
74        my $res = do "$argString";
75        print $res, "\n" if $res;
76      } else {
77        my $rap = Data::Rap->new( target => $argString );
78        rap_boot();
79        $rap->start();
80        #$rap->stop();
81      }
82    }
83    
84    sub rap_boot {
85      # check for another environment-variable: 'RAPBIN'
86      # FIXME: what about 'topic.basedir'??? implement this here!
87      # enhance infrastructure to have per-topic basedirs!!!
88      chdir $ENV{RAPBIN} if $ENV{RAPBIN};
89  }  }
90    
91  my @args = @ARGV;  my @args = @ARGV;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

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