NAME
Image::IPTCInfo::TemplateFile - Template files for IPTC IIM Text
VERSION
This is version 0.2 - keywords and supplemental categories were not saved in the previous version.
DEPENDENCIES
Image::IPTCInfo
DESCRIPTION
Based on Image::IPTCInfo
by Josh Carter (josh@multipart-mixed.com), this allows the loading of data from an IPTC template file, such as used by FotoStation(TM).
CONSTRUCTOR
Pass an array, hash reference, array reference, or list.
The IPTC text content can be obtained from a (clsoed) file, an file handle, or can be passe directly to the constructor.
- TO INSTANTIATE DIRECTLY
-
To load IPTC data "manually", supply to the constructor any or all of the datafields whose names are defined as in the parent module (Image::IPTCInfo). Note that both the 'list' items "supplemental category" (sic) and "keywords" can be supplied as either a comma-delimited list or array references.
Exmaple:
Image::IPTCInfo::TemplateFile->new ( 'caption/abstract' => 'The caption", 'keywords' => 'keyword1,keyword2, keywordN', )
- TO INSTANTIATE FROM A TEMPLATE FILE
-
Supply a
filepath
paramter, the path to a template file to open. This file should be just the first IPTC code: record 2, dataset 0, such as generated by this module or FotoStation(TM). - TO INSTANTIATE FROM A FILE HANDLE
-
Supply the paramter
FILE
as an open filehandle, from which we'll load, and then close. The file should already be at the start of the first IPTC code: record 2, dataset 0.
When called, the constructor parses the template, filling a hash with the fields defined in Image::IPTCInfo
, a reference to which becomes this object.
If no info is found, the object will be empty.
METHOD add_to_Image_IPTC_Info
Transfers the data from the calling object to an Image::IPTCInfo
object supplied in the only paramter.
Returns true or undef
if no object was supplied.
AUTHOR AND COPYRIGHT
Copyright (C) 2002 Josh Carter (josh@multipart-mixed.com) Copyright (C) 2003 Lee Goddard (lgoddard@cpan.org)