| 1 | # | ||||||||||||
| 2 | #=============================================================================== | ||||||||||||
| 3 | # FILE: Episode.pm | ||||||||||||
| 4 | # AUTHOR: Kyle Brandt (mn), kyle@kbrandt.com , http://www.kbrandt.com | ||||||||||||
| 5 | #=============================================================================== | ||||||||||||
| 6 | |||||||||||||
| 7 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | package WebService::TVRage::Episode; | ||||||||||||
| 11 | 1 | ▶ | use Mouse; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | |||||||||||||
| 13 | 1 | has '_episodeHash' => ( is => 'rw' ); | |||||||||||
| 14 | |||||||||||||
| 15 | 0 | ▶ | sub getTitle { | ||||||||||
|
Subroutine
getTitle: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 16 | 0 | my $self = shift; | |||||||||||
| 17 | 0 | ▶ | return $self->_episodeHash()->{title} // ''; | ||||||||||
|
Condition0%0/2
$self->_episodeHash->{"title"} // ""
MC/DC0%0/1
$self->_episodeHash->{"title"} // ""
$self->_episodeHash->{"title"}
Truth table0%0/2
A
A= $self->_episodeHash->{"title"}
| |||||||||||||
| 18 | } | ||||||||||||
| 19 | |||||||||||||
| 20 | 0 | ▶ | sub getEpisodeNo { | ||||||||||
|
Subroutine
getEpisodeNo: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 21 | 0 | my $self = shift; | |||||||||||
| 22 | 0 | ▶ | return $self->_episodeHash()->{epnum} // ''; | ||||||||||
|
Condition0%0/2
$self->_episodeHash->{"epnum"} // ""
MC/DC0%0/1
$self->_episodeHash->{"epnum"} // ""
$self->_episodeHash->{"epnum"}
Truth table0%0/2
A
A= $self->_episodeHash->{"epnum"}
| |||||||||||||
| 23 | } | ||||||||||||
| 24 | |||||||||||||
| 25 | 0 | ▶ | sub getAirDate { | ||||||||||
|
Subroutine
getAirDate: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 26 | 0 | my $self = shift; | |||||||||||
| 27 | 0 | ▶ | return $self->_episodeHash()->{airdate} // ''; | ||||||||||
|
Condition0%0/2
$self->_episodeHash->{"airdate"} // ""
MC/DC0%0/1
$self->_episodeHash->{"airdate"} // ""
$self->_episodeHash->{"airdate"}
Truth table0%0/2
A
A= $self->_episodeHash->{"airdate"}
| |||||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | 0 | ▶ | sub getWebLink { | ||||||||||
|
Subroutine
getWebLink: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 31 | 0 | my $self = shift; | |||||||||||
| 32 | 0 | ▶ | return $self->_episodeHash()->{link} // ''; | ||||||||||
|
Condition0%0/2
$self->_episodeHash->{"link"} // ""
MC/DC0%0/1
$self->_episodeHash->{"link"} // ""
$self->_episodeHash->{"link"}
Truth table0%0/2
A
A= $self->_episodeHash->{"link"}
| |||||||||||||
| 33 | } | ||||||||||||
| 34 | |||||||||||||
| 35 | 1 | 1; | |||||||||||
| 36 | |||||||||||||
| 37 | =head1 NAME | ||||||||||||
| 38 | |||||||||||||
| 39 | WebService::TVRage::Episode - Object returned by WebService::TVRage::EpisodeList->getEpisode(), Contains a List of episodes for all seasons | ||||||||||||
| 40 | |||||||||||||
| 41 | =head1 SYNOPSIS | ||||||||||||
| 42 | |||||||||||||
| 43 | my $episode = $episodeList->getEpisode(); | ||||||||||||
| 44 | $episode->getAirDate(); | ||||||||||||
| 45 | |||||||||||||
| 46 | =head1 Methods | ||||||||||||
| 47 | |||||||||||||
| 48 | =over 1 | ||||||||||||
| 49 | |||||||||||||
| 50 | =item _episodeHash | ||||||||||||
| 51 | |||||||||||||
| 52 | This is populated by WebService::TVRage::EpisodeList->getEpisode(), you shouldn't need to edit this, but you might want to look at it with Data::Dumper | ||||||||||||
| 53 | |||||||||||||
| 54 | =back | ||||||||||||
| 55 | |||||||||||||
| 56 | =head2 getTitle() | ||||||||||||
| 57 | |||||||||||||
| 58 | $episode->getTitle() | ||||||||||||
| 59 | |||||||||||||
| 60 | Returns the title of the episode as a string | ||||||||||||
| 61 | |||||||||||||
| 62 | =head2 getEpisodeNo() | ||||||||||||
| 63 | |||||||||||||
| 64 | $episode->getEpisodeNo() | ||||||||||||
| 65 | |||||||||||||
| 66 | Returns the episode number of which episode it is within the season | ||||||||||||
| 67 | |||||||||||||
| 68 | =head2 getAirDate() | ||||||||||||
| 69 | |||||||||||||
| 70 | $episode->getAirDate() | ||||||||||||
| 71 | |||||||||||||
| 72 | Returns the date that the episode first aired as string like '2006-10-09' | ||||||||||||
| 73 | |||||||||||||
| 74 | =head2 getWebLink() | ||||||||||||
| 75 | |||||||||||||
| 76 | $episode->getWebLink() | ||||||||||||
| 77 | |||||||||||||
| 78 | Returns a URL to TVRage's website for the particular episode. | ||||||||||||
| 79 | |||||||||||||
| 80 | =head1 AUTHOR | ||||||||||||
| 81 | |||||||||||||
| 82 | Kyle Brandt, kyle@kbrandt.com | ||||||||||||
| 83 | http://www.kbrandt.com | ||||||||||||
| 84 | |||||||||||||
| 85 | =cut | ||||||||||||