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 β€” ReadCSV and ReadJSON may be exported if you ask nicely (aka in your use line).

πŸ‘‘ METHODS πŸ‘‘

πŸ’… ReadCSV / ReadJSON

Read a CSV or JSON file into a database hash. Main character behaviour, honestly.

Inputs:

  1. CSV file name or file reference. (Yeah, either one, she's flexible like that.)
  2. Hash reference for the database object.
  3. Optional string used to represent an undefined (missing) tag value. (This one's for deleting tags, so use it with intention bestie.)
  4. For ReadCSV this gives the delimiter for CSV entries, with a default of ",". For ReadJSON this is the character set for converting Unicode escape sequences in strings, with a default of "UTF8". See the ExifTool Charset option 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