[Bps-public-commit] r19683 - Net-Google-Code/trunk/lib/Net/Google
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri May 15 04:49:04 EDT 2009
Author: sunnavy
Date: Fri May 15 04:49:03 2009
New Revision: 19683
Modified:
Net-Google-Code/trunk/lib/Net/Google/Code.pm
Log:
pass email and password only if there is any
Modified: Net-Google-Code/trunk/lib/Net/Google/Code.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code.pm (original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code.pm Fri May 15 04:49:03 2009
@@ -53,6 +53,40 @@
is => 'rw',
);
+sub download {
+ my $self = shift;
+ require Net::Google::Code::Download;
+ return Net::Google::Code::Download->new(
+ project => $self->project,
+ $self->email ? ( email => $self->email ) : (),
+ $self->password ? ( password => $self->password ) : (),
+ @_
+ );
+}
+
+sub issue {
+ my $self = shift;
+ require Net::Google::Code::Issue;
+ return Net::Google::Code::Issue->new(
+ project => $self->project,
+ $self->email ? ( email => $self->email ) : (),
+ $self->password ? ( password => $self->password ) : (),
+ @_
+ );
+}
+
+sub wiki {
+ my $self = shift;
+ require Net::Google::Code::Wiki;
+ return Net::Google::Code::Wiki->new(
+ project => $self->project,
+ $self->email ? ( email => $self->email ) : (),
+ $self->password ? ( password => $self->password ) : (),
+ @_
+ );
+}
+
+
sub load {
my $self = shift;
my $content = $self->fetch( $self->base_url );
@@ -93,29 +127,7 @@
push @labels, $tag->content_array_ref->[0];
}
$self->labels( \@labels ) if @labels;
-
-}
-
-sub download {
- my $self = shift;
- require Net::Google::Code::Download;
- return Net::Google::Code::Download->new(
- project => $self->project,
- email => $self->email,
- password => $self->password,
- @_
- );
-}
-
-sub issue {
- my $self = shift;
- require Net::Google::Code::Issue;
- return Net::Google::Code::Issue->new(
- project => $self->project,
- email => $self->email,
- password => $self->password,
- @_
- );
+ return 1;
}
@@ -137,19 +149,6 @@
}
-sub wiki {
-
- my $self = shift;
- require Net::Google::Code::Wiki;
- return Net::Google::Code::Wiki->new(
- project => $self->project,
- project => $self->project,
- email => $self->email,
- password => $self->password,
- @_
- );
-}
-
sub load_wikis {
my $self = shift;
@@ -179,6 +178,7 @@
__PACKAGE__->meta->make_immutable;
1;
+
__END__
=head1 NAME
More information about the Bps-public-commit
mailing list