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::Series(3) User Contributed Perl Documentation WWW::TV::Series(3)

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

  use WWW::TV::Series qw();
  my $series = WWW::TV::Series->new(name => 'Prison Break');

  my @episodes = $series->episodes;
  print $series->summary;

The WWW::TV::Series module parses TV.com series information using LWP::UserAgent.

    The new() method is the constructor. It takes the id of the show if
    you have previously looked that up, or the name of the show which
    will be used to perform a search and the id will be taken from the
    first result.

    Optional parameters let you set the season number or LWP user agent.

        # default usage
        my $series = WWW::TV::Series->new(name => 'Prison Break');
        my $series = WWW::TV::Series->new(id => 31635);

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

    It is recommended that you lookup the show first and use the ID,
    otherwise you just don't know what will be returned.

    The constructor also takes a single scalar as an argument and does
    it's best to figure out what you want. But due to some shows being
    all digits as a name (e.g. "24"), use of this is not recommended
    (and in future may be deprecated).

    Returns a string containing basic information about this series.

    Returns a list of all the genres that TV.com have categorised this series as.

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

    # in array context, returns an array
    my @genres = $series->genres;

    Returns a list of the cast members. The order is the same as they
    appear on TV.com, which is most likely nothing to go by, but
    in most cases is the main cast order.

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

    # in array context, returns an array
    my @cast = $series->cast;

    Returns a string containing the name of the series.

    Returns the url of an image that can be used to identify this series.

    Returns an array of L<WWW::TV::Episode> objects in order.

    # All episodes
    my @episodes = $series->episodes;

    # Episodes for season 2 only
    my @episodes = $series->episodes( season => 2 );

    The ID of this series, according to TV.com

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 the url that is used to get the episode listings for this
    series.

    $season is optional ; defaults to "all"

WWW::TV::Episode

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".

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.