X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fwww-eztv.git;a=blobdiff_plain;f=lib%2FWWW%2FEZTV%2FEpisode.pm;h=fa2da23ea41ab9546d3fd948d62113012d455a25;hp=0f2ffa28ad10bb2086a1ec8aad18193aeefb5ee6;hb=17802f254b869064461d14e6a2fb015b59246a46;hpb=e3142e3a240afca9f0ac4cf9d4a7c4eb45c701e2 diff --git a/lib/WWW/EZTV/Episode.pm b/lib/WWW/EZTV/Episode.pm index 0f2ffa2..fa2da23 100644 --- a/lib/WWW/EZTV/Episode.pm +++ b/lib/WWW/EZTV/Episode.pm @@ -2,12 +2,17 @@ package WWW::EZTV::Episode; use Moose; with 'WWW::EZTV::UA'; -# ABSTRACT: EZTV single episode +# ABSTRACT: Show episode has show => is => 'ro', isa => 'WWW::EZTV::Show', required => 1; has title => is => 'ro', isa => 'Str', required => 1; has url => is => 'ro', isa => 'Mojo::URL', required => 1; -has links => is => 'rw'; +has links => + is => 'ro', + handles => { + find_link => 'first', + has_links => 'size', + }; has _parsed => is => 'ro', lazy => 1, builder => '_parse'; @@ -68,3 +73,16 @@ sub _parse { } 1; + +=attr has_links + +How many episodes has this show. + +=cut + +=method find_link + +Find first L object matching the given criteria. +This method accept an anon function. + +=cut