Mac::EyeTV::Programme - An EyeTV programme
use Mac::EyeTV; my $eyetv = Mac::EyeTV->new(); # Examine existing programmes foreach my $programme ($eyetv->programmes) { my $start = $programme->start; my $stop = $programme->stop; my $title = $programme->title; my $description = $programme->description; print "$title $start - $stop ($description)\n"; } # Record a new programme my $programme = Mac::EyeTV::Programme->new; $programme->start($start_dt); $programme->stop($stop_dt); $programme->title($title); $programme->description($description); $programme->channel_number($channel_number); $programme->record; # Delete an existing programme $programme->delete;
This module represents an EyeTV program. The programmes() method in Mac::EyeTV returns a list of Mac::EyeTV::Programme objects which represent the existing and future programs.
This is the constructor, which takes no arguments:
my $eyetv = Mac::EyeTV->new();
The delete() method deletes the programme:
$programme->delete;
The description() method returns the description of the programme:
my $description = $programme->description;
The duration() method returns the duration of the programme (as a DateTime::Duration object):
my $duration = $programme->duration;
The record method schedules a new recording:
# Record a new program my $programme = Mac::EyeTV::Programme->new; $programme->start($start_dt); $programme->stop($stop_dt); $programme->title($title); $programme->description($description); $programme->channel_number($channel_number); $programme->record;
The start method returns when the programme starts (as a DateTime object):
my $start = $programme->start;
The stop method returns when the programme stops (as a DateTime object):
my $stop = $programme->stop;
The title() method returns the title of the programme:
my $title = $programme->title;
Leon Brocard <acme@astray.com>.
Copyright (C) 2004-5, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
To install Mac::EyeTV, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mac::EyeTV
CPAN shell
perl -MCPAN -e shell install Mac::EyeTV
For more information on module installation, please visit the detailed CPAN module installation guide.