From 48660faa3889476838b199b0605a4ec38f2b6d72 Mon Sep 17 00:00:00 2001 From: "Andreas J. Koenig" Date: Tue, 2 Dec 2008 05:05:13 +0100 Subject: [PATCH] remove the separate method contains(), it does not offer enough sugar, just duplicatd code --- lib/File/Rsync/Mirror/Recent.pm | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/lib/File/Rsync/Mirror/Recent.pm b/lib/File/Rsync/Mirror/Recent.pm index 62364d4..c7c375f 100644 --- a/lib/File/Rsync/Mirror/Recent.pm +++ b/lib/File/Rsync/Mirror/Recent.pm @@ -160,36 +160,6 @@ use accessors @accessors; =head1 METHODS -=head2 $bool = $obj->contains ( %query ) - -DEPRECATED: use news() directly! - -Similar to news() but returns a boolean answer: undef for false; a -hashref to the last matching recent_event in the interval. - -The query may contain the keys C, C, and C. Each -represents a condition that must be met. If there is more than one -such key, the conditions are ANDed. - -=cut - -sub contains { - my($self, %opt) = @_; - my $contopt; - for my $allow (qw(epoch path type)) { - if (exists $opt{$allow}) { - $contopt->{$allow} = delete $opt{$allow}; - } - } - if (keys %opt) { - require Carp; - Carp::confess - (sprintf "unknown query: %s", join ", ", %opt); - } - my $ret = $self->news(max => 1, contains => $contopt); - return @$ret ? $ret->[0] : undef; -} - =head2 $arrayref = $obj->news ( %options ) XXX WORK IN PROGRESS XXX -- 2.11.4.GIT