Take an existing piece of perl code which calls an Oracle function with two params;
my $func = $dbh->prepare
(q
{
BEGIN
:result := myStoredProc(value1 => :Param1, value2 => :Param2);
END;
}
);
$func->bind_param(":Param1", $opt_a);
$func->bind_param(":Param2", $opt_b);
$func->bind_param_inout(":result", \$result, 20);
$func->execute();
If I now want to extend this functionality to allow any stored procedure to be called (with the name being passed as a parameter to the perl script I suppose).
Is it then possible to pass an arbitrary number of parameters to the function call?
Perl is by no means my strong point, so I've no idea how difficult a problem this is.
The part that I think presents the problem here is the actual SQL;
BEGIN
:result := myStoredProc(value1 => :Param1, value2 => :Param2);
END;
I'm not really sure how this code could be adapted to take any number of params.
If anyone has any experience with this, I'd really appreciate any help you could give.
Thanks