1 package NonameTV
::Exporter
;
11 Abstract base-class for the NonameTV::Exporter::* classes.
13 A package derived from NonameTV::Exporter can be used to export
14 data from the NonameTV programming database to another format.
16 NonameTV::Exporter::*-objects are instantiated from the nonametv.conf
17 configuration file. To instantiate an object, add an entry
18 in the 'Exporters'-hash. Each entry consists of a hash with
19 the package-name of the exporter in the Type-key and any other
20 parameters to the object in other keys.
30 The constructor for the object. Called with a hashref as the first parameter.
31 This is a ref to the configuration for the object from the nonametv.conf-
32 file. The second parameter is a NonameTV::DataStore object.
38 my $class = ref( $_[0] ) || $_[0];
43 # Copy the parameters supplied in the constructor.
44 foreach my $key (keys(%{$_[1]}))
46 $self->{$key} = ($_[1])->{$key};
49 $self->{datastore
} = $_[2];
56 Export is called from the nonametv-export executable. It takes a hashref
57 as a parameter. The hashref points to a hash with the command-line
58 parameters decoded by Getopt::Long using the $NonameTV::Exporter::*::Options
59 arrayref as format specification.
65 my( $self, $param ) = @_;
67 die "You must override Export in your own class"
70 =head1 CLASS VARIABLES
74 Arrayref containing format specifications for Getopt::Long.
76 Example: $Options = [ qw/offset=i days=i/ ]
80 Copyright (C) 2004 Mattias Holmlund.