4 |
## $Id$ |
## $Id$ |
5 |
## ------------------------------------------------------------------------- |
## ------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.4 2003/03/27 15:58:08 joko |
8 |
|
## enhancement: now can execute perl-programs via 'do' here |
9 |
|
## |
10 |
## Revision 1.3 2003/02/20 21:39:49 joko |
## Revision 1.3 2003/02/20 21:39:49 joko |
11 |
## - find_rules moved to Rap.pm |
## - find_rules moved to Rap.pm |
12 |
## |
## |
64 |
|
|
65 |
sub main { |
sub main { |
66 |
my $argString = shift; |
my $argString = shift; |
67 |
my $rap = Data::Rap->new( target => $argString ); |
|
68 |
$rap->start(); |
# check if target is a namespace-string (contains '::') |
69 |
#$rap->stop(); |
# TODO: move this logic/code to inside Data::Rap! |
70 |
|
if ($argString =~ s/::/\//g) { |
71 |
|
my $res = do "$argString"; |
72 |
|
print $res, "\n" if $res; |
73 |
|
} else { |
74 |
|
my $rap = Data::Rap->new( target => $argString ); |
75 |
|
$rap->start(); |
76 |
|
#$rap->stop(); |
77 |
|
} |
78 |
} |
} |
79 |
|
|
80 |
my @args = @ARGV; |
my @args = @ARGV; |