[Bps-public-commit] r17654 - in Net-Google-Code/trunk: lib/Net/Google

fayland at bestpractical.com fayland at bestpractical.com
Thu Jan 8 23:10:30 EST 2009


Author: fayland
Date: Thu Jan  8 23:10:30 2009
New Revision: 17654

Modified:
   Net-Google-Code/trunk/lib/Net/Google/Code.pm
   Net-Google-Code/trunk/t/20.code.t

Log:
add more pod in Net::Google::Code, and svn_url

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	Thu Jan  8 23:10:30 2009
@@ -1,12 +1,10 @@
 package Net::Google::Code;
 
-use warnings;
-use strict;
 use Moose;
-
-our $VERSION = '0.01';
 use Net::Google::Code::Connection;
 
+our $VERSION = '0.02';
+
 has 'project' => (
     isa      => 'Str',
     is       => 'ro',
@@ -24,13 +22,17 @@
 has 'url' => (
     isa     => 'Str',
     is      => 'ro',
-    lazy    => 1,
     default => sub { $_[0]->connection->base_url . $_[0]->project . '/' },
 );
 
+has 'svn_url' => (
+    is => 'ro', isa => 'Str',
+    default => sub { 'http://' . $_[0]->project . '.googlecode.com/svn/' },
+);
+
 has 'issue' => (
     isa     => 'Net::Google::Code::Issue',
-    is      => 'rw',
+    is      => 'ro',
     lazy    => 1,
     default => sub {
         require Net::Google::Code::Issue;
@@ -40,7 +42,7 @@
 
 has 'downloads' => (
     isa     => 'Net::Google::Code::Downloads',
-    is      => 'rw',
+    is      => 'ro',
     lazy    => 1,
     default => sub {
         require Net::Google::Code::Downloads;
@@ -50,7 +52,7 @@
 
 has 'wiki' => (
     isa     => 'Net::Google::Code::Wiki',
-    is      => 'rw',
+    is      => 'ro',
     lazy    => 1,
     default => sub {
         require Net::Google::Code::Wiki;
@@ -62,18 +64,15 @@
 __PACKAGE__->meta->make_immutable;
 
 1;
-
 __END__
 
 =head1 NAME
 
 Net::Google::Code - a simple client library for google code
 
-
 =head1 VERSION
 
-This document describes Net::Google::Code version 0.01
-
+This document describes Net::Google::Code version 0.02
 
 =head1 SYNOPSIS
 
@@ -87,8 +86,31 @@
 
 Net::Google::Code is a simple client library for projects hosted in Google Code.
 
-Currently, it focuses on the issue tracker, and the basic read functionality
-for that is provided.
+Currently, it focuses on the basic read functionality for that is provided.
+
+=head1 ATTRIBUTES
+
+=head2 url
+
+the project homepage
+
+=head2 svn_url
+
+the project svn url (without trunk)
+
+=head1 METHODS
+
+=head2 issue
+
+read L<Net::Google::Code::Issue> for the API detail
+
+=head2 downloads
+
+read L<Net::Google::Code::Downloads> for the API detail
+
+=head2 wiki
+
+read L<Net::Google::Code::Wiki> for the API detail
 
 =head1 DEPENDENCIES
 
@@ -98,7 +120,6 @@
 
 None reported.
 
-
 =head1 BUGS AND LIMITATIONS
 
 No bugs have been reported.
@@ -110,6 +131,7 @@
 
 sunnavy  C<< <sunnavy at bestpractical.com> >>
 
+Fayland Lam  C<< <fayland at gmail.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
@@ -117,4 +139,3 @@
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
-

Modified: Net-Google-Code/trunk/t/20.code.t
==============================================================================
--- Net-Google-Code/trunk/t/20.code.t	(original)
+++ Net-Google-Code/trunk/t/20.code.t	Thu Jan  8 23:10:30 2009
@@ -1,14 +1,19 @@
+#!/usr/bin/perl
+
 use strict;
 use warnings;
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 use_ok('Net::Google::Code');
+
 my $name = 'net-google-code';
 my $project = Net::Google::Code->new( project => $name );
+
 is( $project->url, "http://code.google.com/p/$name/", 'default url' );
+is( $project->svn_url, "http://$name.googlecode.com/svn/", 'svn url' );
 is( $project->project, $name, 'project name' );
+
 isa_ok( $project->connection, 'Net::Google::Code::Connection' );
 isa_ok( $project->issue,      'Net::Google::Code::Issue' );
 isa_ok( $project->downloads,  'Net::Google::Code::Downloads' );
 isa_ok( $project->wiki,       'Net::Google::Code::Wiki' );
-



More information about the Bps-public-commit mailing list