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 |
## |
## |
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; |