
| Current Path : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/Application/ |
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/Application/p |
#!/usr/bin/perl
# This is a general caller script for Perl Modules for the Command line.
# The call works as:
#
# p1 <np1> <np2> .... <Module>[::| ]<function> <par1> <par2> ....
#
# The script calls:
#
# <Module>->new(<np1>,<np2>,.....)-><function>(<par1>,<par2>,....)
#
# The Module will be chosen dynamically, its the first parameter in the
# parameter list which can be eval-ed as a package.
use strict;
use Data::Dumper;
use lib qw(put_your_own_libraries_here_or__better__in_the_environment_variable_PERL5LIB);
my @constructor_parameters = ();
my $package; my $o; my $o1;
while (0 == 0) {
$o = shift(@ARGV);
$package = $o;
$package =~ s/\.pm$//;
$package =~ s/[\\\/]/\:\:/gs;
if ($package !~ /\-/) {
eval("use $package");
last if (!$@);
if ($package =~ /^(.*)\:\:(.*)$/) {
$package = $1;
$o1 = $2;
eval("use $package");
unshift(@ARGV,$o1) if (!$@);
}
last if (!$@);
}
unshift(@constructor_parameters,$o);
next if (@ARGV);
print "No module found.\n";
exit;
}
$o = shift(@ARGV);
$o = $package->new(@constructor_parameters)->$o(@ARGV);
print Dumper($o);