projects
/
lab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49aca65
)
utils::get returns '[]' while json_api gives no results
author
Ken-ichi Mito
<mitty@mitty.jp>
Wed, 21 Aug 2013 00:37:11 +0000
(09:37 +0900)
committer
Ken-ichi Mito
<mitty@mitty.jp>
Wed, 21 Aug 2013 00:38:29 +0000
(09:38 +0900)
* GitHubBackup->repos gives '[]' if no repositories
Dev/github/GitHubBackup.pm
patch
|
blob
|
history
diff --git
a/Dev/github/GitHubBackup.pm
b/Dev/github/GitHubBackup.pm
index
d9d35a3
..
a821840
100644
(file)
--- a/
Dev/github/GitHubBackup.pm
+++ b/
Dev/github/GitHubBackup.pm
@@
-32,7
+32,7
@@
sub get {
}
my $page = 1;
- my $data;
+ my $data = [];
while(1) {
my $result = json_api("$url?per_page=100&page=$page$parameters");
if (ref($result) eq 'ARRAY' && scalar @$result > 0) {
@@
-103,6
+103,8
@@
sub repos {
my $self = shift;
return $self->{repos} if ($self->{repos});
+ $self->{repos} = [];
+
my $account = $self->account or croak "account is not set";
if (my $repository = $self->repository) {
$self->{repos} = [