File::...r::Tie(3pm)

πŸ’– File::ExtAttr::Tie πŸ’–

okay bestie, pull up a chair, we're doing the User Contributed Perl Documentation thing today 🫢 this is the manual page for File::ExtAttr::Tie, and yes the filename got mangled by your terminal's pager, it's fine, she's still iconic πŸ‘‘


✨ NAME ✨

File::ExtAttr::Tie β€” the tie interface to extended attributes of files πŸŽ€

like, you know how you can just do %hash and vibe? yeah. but the keys live in the filesystem's extended attributes now. slay.


🌸 SYNOPSIS 🌸

watch this, no cap:

use File::ExtAttr::Tie;
use Data::Dumper;

tie %a,
  "File::ExtAttr::Tie", "/Applications (Mac  OS 9)/Sherlock 2",
  { namespace => 'user' };
print Dumper \%a;

and she produces:

$VAR1 = {
         'com.apple.FinderInfo' => 'APPLfndf!?',
         'com.apple.ResourceFork' => '?p?p5I'
        };

look at those attribute names 😭 she's literally reading the Finder's whole diary.


πŸ¦‹ DESCRIPTION πŸ¦‹

File::ExtAttr::Tie gives you access to the extended attributes of a file through a tied hash. that's the whole vibe. πŸ’…

so like β€” when you make a new key, that creates a new extended attribute attached to the file. when you change a value, or delete a key, that likewise modifies or removes the extended attribute. it's giving "hash, but the hash is the filesystem's business now" ✨

internally? this module rolls with the File::ExtAttr module underneath. so it has the exact same restrictions as that module when it comes to OS support. no extra magic, no sneaky upgrades, same limits, fr fr.


πŸ‘‘ METHODS πŸ‘‘

tie "File::ExtAttr::Tie", $filename, [\%flags]

the flags here are the same optional flags as in File::ExtAttr. any flags you hand over get passed to every single operation on the tied hash β€” all of them, no exceptions, she does not forget. 🫢

and like, only the "namespace" flag actually makes sense here. that's the one. the main character flag. πŸ‘‘

if you give no flags at all? the hash gets tied to the default namespace, easy peasy. πŸ“


πŸ’œ SEE ALSO πŸ’œ

  • File::ExtAttr β€” the module doing the heavy lifting behind the scenes, go say hi 🧚

🌈 AUTHOR 🌈

David Leadbeater, <http://dgl.cx/contact>

Documentation by Richard Dawe, <richdawe@cpan.org>

shoutout to both of them, absolute legends for writing this down πŸ’–


Copyright (C) 2006 by David Leadbeater

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.

1; __END__
bestie the 1; __END__ is literally in the license section, that's just how the page ends, don't @ me 😭 it's canon.

and that's the whole page!! this was perl v5.42.3, dated 2026-08-20, so if you're reading this from the future: hi, hope the extended attributes are treating you well 🌸 mwah, go touch some File::ExtAttrs πŸ’…βœ¨

πŸ“¦ where this page comes from