]> iEval git - zeal.git/blobdiff - lib/Zeal.pm
Update copyright years
[zeal.git] / lib / Zeal.pm
index c943e51fb1381651fa8aeb206ae4f0110bc422b7..197f9b23fb9e653b146145997b459fdf1055cc0e 100644 (file)
@@ -41,12 +41,13 @@ sub add {
 sub sets {
        my ($self, $family) = @_;
        return map { @$_ } values %{$self->{sets}} unless $family;
+       die "No docsets in family '$family'\n" unless $self->{sets}{$family};
        @{$self->{sets}{$family}}
 }
 
 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]
 }
@@ -120,7 +121,7 @@ Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2014 by Marius Gavrilescu
+Copyright (C) 2014-2015 by Marius Gavrilescu
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself, either Perl version 5.20.1 or,
This page took 0.023202 seconds and 4 git commands to generate.