[Bps-public-commit] r19733 - Net-Google-Code/trunk/lib/Net/Google/Code

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed May 20 00:27:46 EDT 2009


Author: sunnavy
Date: Wed May 20 00:27:46 2009
New Revision: 19733

Modified:
   Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm

Log:
let updated return undef if not loaded

Modified: Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm	(original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm	Wed May 20 00:27:46 2009
@@ -221,7 +221,8 @@
 # the issue's last modified date, return a DateTime object
 sub updated {
     my $self = shift;
-    return $self->comments->[-1]->date;
+    my $last_comment = $self->comments->[-1];
+    return $last_comment ? $last_comment->date : undef;
 }
 
 sub create {



More information about the Bps-public-commit mailing list