GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WWW::TV::Episode(3) User Contributed Perl Documentation WWW::TV::Episode(3)

WWW::TV::Episode - Parse TV.com for TV Episode information.

  use WWW::TV::Episode qw();
  my $episode = WWW::TV::Series->new(id => '475567');

  # with optional paramers

  print $episode->summary;

The WWW::TV::Episode module parses TV.com episode information using LWP::UserAgent. Unfortunately I can't see a way to search for an episode by name, so I haven't implemented it. It is probably possible to do so if you populate a series object and grep $series->episodes for the episode name you are searching for.

    The new() method is the constructor. It takes the id of the show
    assuming you have previously looked that up.

        # default usage
        my $episode = WWW::TV::Episode->new(id => 924072);

        # change user-agent from the default of "libwww-perl/#.##"
        my $episode = WWW::TV::Episode->new(id => 924072, agent => 'WWW::TV');

    It also (optionally) takes the name of the episode. This is not used
    in any way to search for the episode, but is used as initial data
    population for that field so that the html isn't parsed if you only
    want an object with the name. This is used by the L<WWW::TV::Series>
    object to populate a big array of episodes that have names without
    needing to fetch any pages.

        # pre-populate episode name
        my $episode = WWW::TV::Episode->new(id => 924072, name => 'Run!');

    The ID of this episode, according to TV.com

    Returns a string containing the name of the episode.

    Returns a string containing basic information about this series.

    Returns the season number that this episode appeared in.

    Returns the overall number of this episode. Note, this is not
    necessarily the production order of the episodes, but is the order
    in which they aired.

    Returns episode details using a special format string, similar to printf:
       %I - series ID
       %N - series name
       %s - season number
       %S - season number (0-padded to two digits, if required)
       %i - episode ID
       %e - episode number
       %E - episode number (0-padded to two digits, if required)
       %n - episode name
       %d - date episode first aired

    The default format is:
       %N.s%Se%E - %n (eg: "Heroes.s1e02 - Don't Look Back")

    Returns a string of the date this episode first aired in ISO 8601 (yyyy-mm-dd) format.

    Returns a list of the stars that appeared in this episode.

    # in scalar context, returns a comma-delimited string
    my $stars = $episode->stars;

    # in array context, returns an array
    my @stars = $episode->stars;

    Returns a list of the guest stars that appeared in this episode.

    # in scalar context, returns a comma-delimited string
    my $guest_stars = $episode->guest_stars;

    # in array context, returns an array
    my @guest_stars = $episode->guest_stars;

    Returns a list of the people who have recurring roles
    that appeared in this episode

    # in scalar context, returns a comma-delimited string
    my $recurring_roless = $episode->recurring_roless;

    # in array context, returns an array
    my @recurring_roless = $episode->recurring_roless;

    Returns a list of the people that wrote this episode.

    # in scalar context, returns a comma-delimited string
    my $writers = $episode->writers;

    # in array context, returns an array
    my @writers = $episode->writers;

    Returns a list of the people that directed this episode.

    # in scalar context, returns a comma-delimited string
    my $directors = $episode->directors;

    # in array context, returns an array
    my @directors = $episode->directors;

Returns the current user agent setting, and sets to $value if provided.

Returns the current mirror site setting, and sets to $value if provided.

Default site is "www"; other options include: us, uk, au

    Returns the url that was used to create this object.

    Returns an array of other episodes for the same season of this series.

    Returns the series ID for this episode.

    Returns an L<WWW::TV::Series> object which is the complete series
    that this episode is a part of.

WWW::TV::Series

There isn't yet any caching support. I don't see a need for it, but if you feel the need to implement it then don't let me stop you.

There also isn't support for proxy servers yet. LWP should use it from your environment if you really need it, but who still uses them anyway? Isn't it all done transparently these days.

Please report any bugs or feature requests through the web interface at <http://rt.cpan.org/Dist/Display.html?Queue=WWW-TV>.

Danial Pearce "cpan@tigris.id.au"

Stephen Steneker "stennie@cpan.org"

Copyright (c) 2006-2008 Danial Pearce "cpan@tigris.id.au". All rights reserved.

Some parts copyright 2007-2008 Stephen Steneker "stennie@cpan.org".

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2009-03-12 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.