Object...e::File(3pm)

πŸ“¦
version 1.08 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Object::Signature::File πŸ’–

okay so this is Object::Signature::File β€” straight out of the User Contributed Perl Documentation collection, bestie. it's giving "extra credit for your signature" and honestly? iconic.


✨ NAME ✨

Object::Signature::File β€” the extended signature API for storing objects in files, no cap πŸŽ€


🌸 DESCRIPTION 🌸

so here's the tea. the basic Object::Signature class is your low-key, no-frills bestie: it hands you a raw cryptographic signature and that's it. Object::Signature::File is the glow-up πŸ’… β€” it extends the signature method so objects that want some control over how they get stored as files actually get a say.

like, picture this: some objects really want their cached version to have a matching file extension (a gif image, say πŸ¦‹) so the web-accessible cache path can just be dropped straight into a web page. main character energy, fr.

and then the image gets sent out to the browser with the correct mime type. periodt. ✨


πŸ‘‘ METHODS πŸ‘‘

πŸ“ signature_ext

the signature_ext method tells you the preferable file extension for the content of the object β€” if applicable, obviously.

  • if it returns a string, that means the object should be stored in a file with that specific extension.
  • if it returns a null string, that means the file should be stored with no extension at all.
  • if it returns undef (which is the default value), that means there's no preference for the extension of the file. it's whatever, bestie πŸ™ˆ

🌈 signature_name

ngl, signature_name is the least-useful part of this whole extended API, and it's rarely used. it's included mostly for completeness β€” a little completionist moment 🫢

  • if it returns a string, that's the name part of a file name that the object should be stored in, if possible.
  • if it returns a null string, that explicitly says there is no file name, or a file name isn't possible.
  • if it returns undef (yep, the default value again), that means no preference for the name of the file.

πŸ’œ AUTHOR πŸ’œ

Adam Kennedy <adamk@cpan.org> β€” we stan πŸ’–


Copyright 2004 - 2007 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.


okay so that's the whole vibe check 🌈 this page is from perl v5.28.0, dated 2018-11-21, and it lives under the Object...e::File(3pm) banner. mwah, go slay your file caching bestie πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from