]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/SOAP.pm
- Allow selecting the newest N bugs (closes: #84681)
[debbugs.git] / Debbugs / SOAP.pm
index cfe74bbf0c43cc4c5d63f7bd406b139cb6e9cab4..f9a44566467622e8af576c87d2641f3d7e495049 100644 (file)
@@ -138,6 +138,22 @@ sub get_bugs{
      return \@bugs;
 }
 
+=head2 newest_bugs
+
+     my @bugs = newest_bugs(5);
+
+Returns a list of the newest bugs. [Note that all bugs are *not*
+guaranteed to exist, but they should in the most common cases.]
+
+=cut
+
+sub newest_bugs{
+     my $VERSION = __populate_version(pop);
+     my ($self,$num) = @_;
+     my $newest_bug = Debbugs::bugs::newest_bug();
+     @bugs = ($newest_bug - $num + 1) .. $newest_bug;
+}
+
 
 =head2 get_bug_log