From 795a1ad18a72354f8ad601a31c85481de7b196c0 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Wed, 31 Dec 2014 23:44:21 +0200 Subject: [PATCH] Make family:query syntax in Zeal->query stricter family now has to match \w+ and query must not start with a : --- lib/Zeal.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Zeal.pm b/lib/Zeal.pm index c943e51..c2ed5d7 100644 --- a/lib/Zeal.pm +++ b/lib/Zeal.pm @@ -46,7 +46,7 @@ sub sets { sub query { my ($self, $query, $family) = @_; - ($family, $query) = split /:/, $query, 2 if !$family && $query =~ /:/; + ($family, $query) = split /:/, $query, 2 if !$family && $query =~ /^\w+:[^:]/; my @res = map { $_->query($query) } $self->sets($family); wantarray ? @res : $res[0] } -- 2.39.2