package Exec; use strict; use vars qw($AUTOLOAD); sub AUTOLOAD { my($self,$arg) = @_; my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2); if($method !~ m/^[a-zA-Z0-9_.]+$/) { die("method name not allowed - $method"); } if(not -f "/usr/local/soap/exec/$method") { die("file not found - $method"); } if($arg =~ m{[^a-zA-Z0-9_.,%^=@/:+ -]}) { die("invalid argument - $arg"); } my $output = `/usr/local/soap/exec/$method '$arg'`; chomp($output); return $output; } 1;