root/lang/perl/Net-Google-Spreadsheets/trunk/lib/Net/Google/Spreadsheets/Spreadsheet.pm @ 27257

Revision 27257, 1.1 kB (checked in by lopnor, 4 years ago)

fix typo in the pod

Line 
1package Net::Google::Spreadsheets::Spreadsheet;
2use Moose;
3use XML::Atom;
4use Net::Google::Spreadsheets::Worksheet;
5use Path::Class;
6
7extends 'Net::Google::Spreadsheets::Base';
8
9has +title => (
10    is => 'ro',
11);
12
13has key => (
14    isa => 'Str',
15    is => 'ro',
16    required => 1,
17    lazy => 1,
18    default => sub {
19        my $self = shift;
20        my $key = file(URI->new($self->id)->path)->basename;
21        return $key;
22    }
23);
24
25after _update_atom => sub {
26    my ($self) = @_;
27    $self->{content} = $self->atom->content->elem->getAttribute('src');
28};
29
30sub worksheets {
31    my ($self, $cond) = @_;
32    return $self->list_contents('Net::Google::Spreadsheets::Worksheet', $cond);
33}
34
35sub add_worksheet {
36    my ($self, $args) = @_;
37    my $entry = Net::Google::Spreadsheets::Worksheet->new->entry;
38    my $atom = $self->service->post($self->content, $entry);
39    $self->sync;
40    return Net::Google::Spreadsheets::Worksheet->new(
41        container => $self,
42        atom => $atom,
43    );
44}
45
461;
47__END__
48
49=head1 NAME
50
51Net::Google::Spreadsheets::Spreadsheet - Representation of spreadsheet
52
53=head1 SYNOPSIS
54
55=head1 AUTHOR
56
57Nobuo Danjou E<lt>nobuo.danjou@gmail.comE<gt>
58
59=cut
Note: See TracBrowser for help on using the browser.