| 1 | package Net::Posterous::Object; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 2 | ▶ | use Class::Accessor "antlers"; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | =head1 NAME | ||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | Net::Posterous::Object - base class for Net::Posterous objects | ||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | =head1 METHODS | ||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | =cut | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | =head2 new | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | Basic constructor. | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | =cut | ||||||||||||||||||||
| 18 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 19 | 0 | my $class = shift; | |||||||||||||||||||
| 20 | 0 | my %opts = @_; | |||||||||||||||||||
| 21 | 0 | return bless \%opts, $class; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 0 | ▶ | sub _handle_datetime { | ||||||||||||||||||
|
Subroutine
_handle_datetime: not called CC=3 SCAR=24.8
| |||||||||||||||||||||
| 25 | 0 | my $self = shift; | |||||||||||||||||||
| 26 | # Make sure date is in RFC822 format e.g Sun, 03 May 2009 19:58:58 -0700 | ||||||||||||||||||||
| 27 | 0 | ▶ | $self->{_strp} ||= DateTime::Format::Strptime->new( pattern => "%a, %d %b %Y %H:%M:%S %z"); | ||||||||||||||||||
|
Condition0%0/3
$self->{"_strp"} ||= "DateTime::Format::Strptime"->new("pattern", "%a, %d %b %Y %H:%M:%S %z")
MC/DC0%0/2
$self->{"_strp"} ||= "DateTime::Format::Strptime"->new("pattern", "%a, %d %b %Y %H:%M:%S %z")
$self->{"_strp"}
"DateTime::Format::Strptime"->new("pattern", "%a, %d %b %Y %H:%M:%S %z")
Truth table0%0/3
A ||= B
A= $self->{"_strp"}B= "DateTime::Format::Strptime"->new("pattern", "%a, %d %b %Y %H:%M:%S %z")
| |||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | $self->date($self->{_strp}->format_datetime(shift)) if @_; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 30 | 0 | return $self->{_strp}->parse_datetime($self->date); | |||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 2 | 1; | |||||||||||||||||||