mirror of
https://github.com/Cacti/cacti.git
synced 2026-11-09 05:26:50 +09:00
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@1725 860744bd-22fc-0310-8c96-e9fe5004b5ca
20 lines
353 B
Perl
20 lines
353 B
Perl
chdir("./scripts");
|
|
$loaded = 0;
|
|
while ($file = <*.pl>) {
|
|
next if $file eq $0;
|
|
eval 'require $file';
|
|
$loaded++;
|
|
}
|
|
print "Loading complete ($loaded files loaded)\r\n";
|
|
while ($in = <STDIN>) {
|
|
if ($in eq "quit\r\n") {
|
|
print "Exiting\r\n";
|
|
exit;
|
|
} elsif ($in =~ /^([^\s]+) (.+)\r\n$/) {
|
|
eval {
|
|
$out = &{$1}($2);
|
|
};
|
|
print "$out\r\n";
|
|
}
|
|
}
|