func()
$handle->func(@arguments,function_name)
This function calls private nonportable and nonstandard
methods for handles. The name of the function is given as the last
argument. Any arguments for the function specified are given first.
You can give certain private built-in functions:
_ListDBs with the hostname and optionally the port
as the first parameter (use data_sources()
instead); _ListTables
(deprecated; use tables() instead);
_CreateDB with the database name as the first
parameter; and _DropDB with the database name as
the first parameter. Here is an example:
...
my @tables = $dbh->func('_ListTables');
foreach my $table(@tables) {
print $table, "\n";
}As this syntax indicates, you can create your own private DBI functions with this method. It’s not well supported in MySQL, though.