[Bps-public-commit] r17521 - in Net-Google-Code/trunk: lib/Net/Google/Code
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Jan 2 02:33:57 EST 2009
Author: sunnavy
Date: Fri Jan 2 02:33:55 2009
New Revision: 17521
Modified:
Net-Google-Code/trunk/ (props changed)
Net-Google-Code/trunk/lib/Net/Google/Code/Search.pm
Log:
r18479 at sunnavys-mb: sunnavy | 2009-01-02 13:48:21 +0800
add ids to store search results
Modified: Net-Google-Code/trunk/lib/Net/Google/Code/Search.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code/Search.pm (original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code/Search.pm Fri Jan 2 02:33:55 2009
@@ -28,6 +28,12 @@
default => '',
);
+has 'ids' => (
+ isa => 'ArrayRef[Int]',
+ is => 'rw',
+ default => sub { [] },
+);
+
sub search {
my $self = shift;
my $mech = $self->connection->mech;
@@ -46,12 +52,9 @@
my $content = $mech->content;
- if ( $mech->title =~ /Issue\s+\d+/ ) {
+ if ( $mech->title =~ /Issue\s+(\d+)/ ) {
# only get one ticket
- my $ticket =
- Net::Google::Search::Ticket->new( connection => $self->connection );
- $ticket->parse($content);
- push @{$self->tickets}, $ticket;
+ @{$self->ids} = $1;
}
elsif ( $mech->title =~ /Issues/ ) {
# get a ticket list
@@ -61,6 +64,7 @@
else {
warn "no idea what the content like";
}
+
}
More information about the Bps-public-commit
mailing list