Skip to content

Commit 3bf1c1a

Browse files
committed
fix method name verification to support numbers
in prefixes.
1 parent 478fc1b commit 3bf1c1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DBI.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ sub _new_sth { # called by DBD::<drivername>::db::prepare)
13911391
unless $class =~ /^DBD::(\w+)::(dr|db|st)$/;
13921392
my ($driver, $subtype) = ($1, $2);
13931393
Carp::croak("invalid method name '$method'")
1394-
unless $method =~ m/^([a-z]+_)\w+$/;
1394+
unless $method =~ m/^([a-z][a-z0-9]*_)\w+$/;
13951395
my $prefix = $1;
13961396
my $reg_info = $dbd_prefix_registry->{$prefix};
13971397
Carp::carp("method name prefix '$prefix' is not associated with a registered driver") unless $reg_info;

0 commit comments

Comments
 (0)