Object...e::File(3pm)
π 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 β
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
- debian bookworm: libobject-signature-perl 1.08-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libobject-signature-perl 1.08-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libobject-signature-perl 1.08-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libobject-signature-perl 1.08-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms