[Bps-public-commit] r18285 - in Net-Google-Code/branches/write: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Feb 9 01:48:58 EST 2009


Author: sunnavy
Date: Mon Feb  9 01:48:53 2009
New Revision: 18285

Modified:
   Net-Google-Code/branches/write/   (props changed)
   Net-Google-Code/branches/write/lib/Net/Google/Code.pm

Log:
 r19694 at sunnavys-mb:  sunnavy | 2009-02-09 13:04:30 +0800
 trans email and password too whe init an object


Modified: Net-Google-Code/branches/write/lib/Net/Google/Code.pm
==============================================================================
--- Net-Google-Code/branches/write/lib/Net/Google/Code.pm	(original)
+++ Net-Google-Code/branches/write/lib/Net/Google/Code.pm	Mon Feb  9 01:48:53 2009
@@ -5,13 +5,15 @@
 
 our $VERSION = '0.02';
 
-has 'home'  => (
+has 'home' => (
     isa     => 'Net::Google::Code::Home',
     is      => 'ro',
     lazy    => 1,
     default => sub {
         require Net::Google::Code::Home;
-        Net::Google::Code::Home->new( project => $_[0]->project );
+        Net::Google::Code::Home->new( map { $_ => $_[0]->$_ }
+              grep { defined $_[0]->$_ } qw/project email password/ );
+        
     },
     handles => [ 'owners', 'members', 'summary', 'description', 'labels' ],
 );
@@ -22,7 +24,8 @@
     lazy    => 1,
     default => sub {
         require Net::Google::Code::Issue;
-        Net::Google::Code::Issue->new( project => $_[0]->project );
+        Net::Google::Code::Issue->new( map { $_ => $_[0]->$_ }
+              grep { defined $_[0]->$_ } qw/project email password/ );
     }
 );
 
@@ -32,7 +35,8 @@
     lazy    => 1,
     default => sub {
         require Net::Google::Code::Downloads;
-        Net::Google::Code::Downloads->new( project => $_[0]->project );
+        Net::Google::Code::Downloads->new( map { $_ => $_[0]->$_ }
+              grep { defined $_[0]->$_ } qw/project email password/ );
     }
 );
 
@@ -42,7 +46,8 @@
     lazy    => 1,
     default => sub {
         require Net::Google::Code::Wiki;
-        Net::Google::Code::Wiki->new( project => $_[0]->project );
+        Net::Google::Code::Wiki->new( map { $_ => $_[0]->$_ }
+              grep { defined $_[0]->$_ } qw/project email password/ );
     }
 );
 



More information about the Bps-public-commit mailing list