1 |
joko |
1.1 |
#!/usr/bin/perl |
2 |
|
|
|
3 |
|
|
## ------------------------------------------------------------------------- |
4 |
|
|
## $Id: Config.pm,v 1.19 2003/02/14 12:37:04 joko Exp $ |
5 |
|
|
## ------------------------------------------------------------------------- |
6 |
|
|
## $Log: Config.pm,v $ |
7 |
|
|
## ------------------------------------------------------------------------- |
8 |
|
|
|
9 |
|
|
|
10 |
|
|
use strict; |
11 |
|
|
use warnings; |
12 |
|
|
|
13 |
|
|
BEGIN { |
14 |
|
|
use FindBin qw($Bin); |
15 |
|
|
use lib "$Bin/../../libs"; |
16 |
|
|
} |
17 |
|
|
|
18 |
|
|
|
19 |
|
|
# ------------------------------------ main ------------ |
20 |
|
|
use Data::Dumper; |
21 |
|
|
use Data::Rap; |
22 |
|
|
|
23 |
|
|
sub find_rules { |
24 |
|
|
return '../etc/rap.xml'; |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
sub main { |
28 |
|
|
my $argString = shift; |
29 |
|
|
my $rulesfile = find_rules(); |
30 |
|
|
my $rap = Data::Rap->new( filename => $rulesfile, target => $argString ); |
31 |
|
|
$rap->start(); |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
my @args = @ARGV; |
35 |
|
|
@args = () if not @args; |
36 |
|
|
main(join(' ', @args)); |
37 |
|
|
|
38 |
|
|
|
39 |
|
|
1; |
40 |
|
|
__END__ |