[Bps-public-commit] Net-Google-Code branch, issues-api, updated. ec346f83d8425df31fb414589efcc48d2573ee0b

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Oct 20 01:26:00 EDT 2009


The branch, issues-api has been updated
       via  ec346f83d8425df31fb414589efcc48d2573ee0b (commit)
      from  51895d32d5834c19446b6fa53b94eac7e7820f96 (commit)

Summary of changes:
 lib/Net/Google/Code/Issue/Search.pm |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit ec346f83d8425df31fb414589efcc48d2573ee0b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Oct 20 12:13:42 2009 +0800

    add fallback_to_search arg to updated_after so we can return when the quick way fails

diff --git a/lib/Net/Google/Code/Issue/Search.pm b/lib/Net/Google/Code/Issue/Search.pm
index d2de2a8..3861390 100644
--- a/lib/Net/Google/Code/Issue/Search.pm
+++ b/lib/Net/Google/Code/Issue/Search.pm
@@ -29,7 +29,9 @@ has 'results' => (
 
 sub updated_after {
     my $self  = shift;
-    my ($after) = validate_pos(@_, { isa => 'DateTime' } );
+    my ( $after, $fallback_to_search ) =
+      validate_pos( @_, { isa => 'DateTime' },
+        { optional => 1, default => 1 } );
     
     my @results;
 
@@ -62,6 +64,8 @@ sub updated_after {
         }
     }
 
+    return unless $fallback_to_search;
+
     # now we have to find issues by search
     if ( $self->search( load_after_search => 1, can => 'all', q => '' ) ) {
         my $results = $self->results;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list