From: Marius Gavrilescu Date: Wed, 31 Dec 2014 21:44:21 +0000 (+0200) Subject: Make family:query syntax in Zeal->query stricter X-Git-Tag: 0.000_003~5 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=795a1ad18a72354f8ad601a31c85481de7b196c0;p=zeal.git Make family:query syntax in Zeal->query stricter family now has to match \w+ and query must not start with a : --- 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] }