Image::...::Import(3)
π NAME π
Image::ExifTool::Import β bestie, this is the little module that imports your tag info from CSV and JSON database files. That's the whole vibe. It's a User Contributed Perl Documentation page (section 3 of the manual, iykyk), and it's here to feed data into your database hash. Periodt.
β¨ SYNOPSIS β¨
use Image::ExifTool::Import qw(ReadCSV ReadJSON);
$err = ReadCSV($csvFile, \%database);
$err = ReadJSON($jsonfile, \%database);
Like. That's it. That's the whole entrance. Two functions, both returning $err, both stuffing your %database. Slay. π
πΈ DESCRIPTION πΈ
Okay so this module is literally just a little collection of routines for importing tag information from CSV (Comma Separated Value) and JSON (JavaScript Object Notation) database files. That's the mission. No cap. π¦
π«Ά EXPORTS π«Ά
- By default? Nothing. Zero. Nada. It's giving mysterious.
- But β and this is the good part β
ReadCSVandReadJSONmay be exported if you ask nicely (aka in youruseline).
π METHODS π
π ReadCSV / ReadJSON
Read a CSV or JSON file into a database hash. Main character behaviour, honestly.
Inputs:
- CSV file name or file reference. (Yeah, either one, she's flexible like that.)
- Hash reference for the database object.
- Optional string used to represent an undefined (missing) tag value. (This one's for deleting tags, so use it with intention bestie.)
- For
ReadCSVthis gives the delimiter for CSV entries, with a default of",". ForReadJSONthis is the character set for converting Unicode escape sequences in strings, with a default of"UTF8". See the ExifToolCharsetoption for a list of valid character sets.
Heads up: argument 3 is not the same thing for both functions. Same slot, different job. Don't get it twisted. π
Return Value:
These functions return an error string, or undef on success β and on success they populate the database hash with entries from the CSV or JSON file. β¨
The way that works: entries are keyed based on the SourceFile column of the CSV or JSON information, and are stored as hash lookups of tag name/value for each SourceFile. The order of the keys (CSV column order, or the order in a JSON object) is stored as an ARRAY reference in a special "_ordered_keys_" element of this hash. So the order is preserved, not vibes-only. Iconic. π₯
π AUTHOR π
Copyright 2003-2026, Phil Harvey (philharvey66 at gmail.com) π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
β SEE ALSO β
And that's the whole page, bestie β from the Image::...::Import(3) header energy all the way down. This cutie was generated by perl v5.42.1 on 2026-03-31. Go import something gorgeous. π§π
π¦ where this page comes from
- fedora 43: perl-Image-ExifTool 13.50-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-Image-ExifTool 13.50-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms