File Coverage

blib/lib/Net/Posterous/Site.pm
Criterion Covered Total %
statement 9 10 90.0
branch n/a
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 13 15 86.6


line stmt bran cond sub pod time code
1             package Net::Posterous::Site;
2              
3 1     1   1478 use strict;
  1         2  
  1         35  
4 1     1   5 use base qw(Net::Posterous::Object);
  1         3  
  1         510  
5 1     1   11 use Class::Accessor "antlers";
  1         14  
  1         5  
6              
7             =head1 NAME
8              
9             Net::Posterous::Site - represent a site instance in Net::Posterous
10              
11             =head1 METHODS
12              
13             =cut
14              
15             =head2 id
16              
17             Get or set the id for this Site.
18              
19             =cut
20              
21             has id => ( is => "rw", isa => "Int" );
22              
23             =head2 name
24              
25             Get or set the name for this Site.
26              
27             =cut
28              
29             has name => ( is => "rw", isa => "Str" );
30              
31             =head2 url
32              
33             Get or set the url for this Site.
34              
35             =cut
36              
37             has url => ( is => "rw", isa => "Str" );
38              
39             =head2 private
40              
41             Get or set whether this Site is private or not.
42              
43             =cut
44              
45             has private => ( is => "rw", isa => "Bool" );
46              
47             =head2 primary
48              
49             Get or set whether this Site is the primary site or not.
50              
51             =cut
52              
53             has primary => ( is => "rw", isa => "Bool" );
54              
55             =head2 comments_enabled
56              
57             =head2 commentsenabled
58              
59             Get or set whether this Site has comments enabled.
60              
61             C is an alias due to Posterous having interestingly inconsistent naming schema.
62              
63             =cut
64              
65 0     0 1   sub comments_enabled { shift->commentsenabled(@_); }
66              
67             has commentsenabled => ( is => "rw", isa => "Bool" );
68              
69             =head2 num_posts
70              
71             Get or set the number of posts this Site has.
72              
73             =cut
74              
75             has num_posts => ( is => "rw", isa => "Int" );
76              
77             1;