Change attrs() for attr() to work with mojo::ua 4.x
[cascardo/www-eztv.git] / lib / WWW / EZTV / Show.pm
index 433b4e7..f9c994e 100644 (file)
@@ -4,7 +4,7 @@ with 'WWW::EZTV::UA';
 use WWW::EZTV::Link;
 use WWW::EZTV::Episode;
 
-# ABSTRACT: EZTV show object
+# ABSTRACT: Show object
 
 has title    => is => 'ro', isa => 'Str', required => 1;
 has name     => is => 'ro', lazy => 1, default => \&_name;
@@ -28,10 +28,10 @@ sub _build_episodes {
         my $a  = $tr->at('td:nth-child(2) a');
 
         WWW::EZTV::Episode->new(
-            title    => $a->attrs('title'),
-            url      => $self->url->clone->path($a->attrs('href')),
+            title    => $a->attr('title'),
+            url      => $self->url->clone->path($a->attr('href')),
             links    => $tr->find('td:nth-child(3) a')->map(sub{
-                WWW::EZTV::Link->new( url => shift->attrs('href') )
+                WWW::EZTV::Link->new( url => shift->attr('href') )
             }),
             released => $tr->at('td:nth-child(4)')->all_text,
             show     => $self
@@ -88,15 +88,21 @@ sub _cleanup_str {
 =cut
 
 =attr episodes
+
 Collection of episodes fetched for this show.
+
 =cut
 
 =attr has_episodes
+
 How many episodes has this show.
+
 =cut
 
 =method find_episode
+
 Find first L<WWW::EZTV::Episode> object matching the given criteria. 
 This method accept an anon function.
+
 =cut