
| Current Path : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/scripts/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/scripts/ppl |
#!/usr/bin/perl
use DivBasicF::DBComSimple;
use Data::Dumper;
$Data::Dumper::Indent = 1;
#DivBasicF::DBComSimple->read_in_environment();
my $com = DivBasicF::DBComSimple->new($ENV{'process_database'},
$ENV{'process_port'},100,2);
my $wait = shift(@ARGV) || 2;
my $pars = eval(join("",<STDIN>));
push(@$pars,@ARGV);
if ($pars->[0] =~ /^ *CONNECTION... *(.*?) *$/) {
$com->connection($1);
shift(@$pars);
}
$com->msg($pars) if (@$pars);
$pars = $com->get($wait,7);
unshift(@$pars,"CONNECTION... " . $com->get_connection());
$wait = Dumper($pars);
$wait =~ s/^ *\$VAR(\d+) *\= *//s;
print $wait;
if ($pars->[1] =~ /package +(.*?)\:\:---NR---/) {
my $pkg = $1;
$pkg =~ s/\:\:/\//gs;
mkdir($pkg);
my $zaehler = 0;
my $file;
while (0 == 0) {
$zaehler = sprintf("%03u",$zaehler + 1);
$file = $pkg . "/" . $zaehler . ".pm";
last if (!(-f($file)));
}
my $text = $pars->[1];
$zaehler = "::" . $zaehler;
$text =~ s/\:\:---NR---/$zaehler/;
open(FFILE,">".$file);
print FFILE $text;
close(FFILE);
}