[libcatmandu-perl] 51/101: check delete_by_query support in delete command

Jonas Smedegaard dr at jones.dk
Tue Feb 23 13:43:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libcatmandu-perl.

commit 9b099a095a011b9b274573ded58b252b9d5a28b9
Author: Nicolas Steenlant <nicolas.steenlant at ugent.be>
Date:   Mon Jan 18 14:56:11 2016 +0100

    check delete_by_query support in delete command
---
 lib/Catmandu/Cmd/delete.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/Catmandu/Cmd/delete.pm b/lib/Catmandu/Cmd/delete.pm
index 81b0220..9cf4474 100644
--- a/lib/Catmandu/Cmd/delete.pm
+++ b/lib/Catmandu/Cmd/delete.pm
@@ -6,6 +6,7 @@ our $VERSION = '0.9505';
 
 use parent 'Catmandu::Cmd';
 use Catmandu;
+use Catmandu::Util qw(delete_by_query);
 use namespace::clean;
 
 sub command_opt_spec {
@@ -26,6 +27,7 @@ sub command {
     if ($opts->id) {
         $from->delete($_) for @{$opts->id};
     } elsif ($opts->query // $opts->cql_query) {
+        check_able($from, 'delete_by_query');
         $from->delete_by_query(
             cql_query => $opts->cql_query,
             query     => $opts->query,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatmandu-perl.git



More information about the Pkg-perl-cvs-commits mailing list