Tie::H...:Offset(3pm)
β¨ NAME β¨
Tie::Handle::Offset β a tied handle that hides the beginning of a file π
Like, imagine a file but the first chunk is just... not your business. That's the whole vibe. It's from the User Contributed Perl Documentation collection, bestie π
π VERSION π
version 0.004 β iconic, legendary, exactly what it says on the tin β¨
π«Ά SYNOPSIS π«Ά
use Tie::Handle::Offset;
tie *FH, 'Tie::Handle::Offset', "<", $filename, { offset => 20 };
That's it. That's the whole thing. Tie it, give it an offset, and the first 20 bytes are simply gone from your perspective. No cap π§
πΈ DESCRIPTION πΈ
okay so here's the tea β β this module gives you a file handle that hides the beginning of a file. Like a little curtain π drawn over the first N bytes.
After opening, the file is positioned at the offset location. And the way that seek() and tell() calls are modified to preserve the offset?? obsessed. It's giving "gaslighting your own file handle, but consensually" π
For example, tell($fh) will return 0, though the actual file position is at the offset. Likewise, seek($fh,80,0) will seek to 80 bytes from the offset instead of 80 bytes from the actual start of the file. So in your head you're at the very beginning, but the file itself is like "girl you're 20 bytes deep already" π
π SUPPORT π
π₯ Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker at <https://github.com/dagolden/tie-handle-offset/issues>. You will be notified automatically of any progress on your issue. Yes bestie, automatic updates, main character treatment fr fr π
π Source Code
This is open source software. The code repository is available for public review and contribution under the terms of the license.
<https://github.com/dagolden/tie-handle-offset>
git clone https://github.com/dagolden/tie-handle-offset.git
clone it, fork it, contribute to it β she's all yours π¦
π AUTHOR π
David Golden <dagolden@cpan.org>
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2012 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
lowkey the licensing is the least dramatic part but it still matters, bestie. Apache 2.0, January 2004, periodt. π
and that's a wrap on this page from perl v5.36.0, dated 2022-11-20, filed under Tie::H...:Offset(3pm) β¨ tysm for reading, go hide some file beginnings responsibly πΈπ«Ά
π¦ where this page comes from
- debian bookworm: libtie-handle-offset-perl 0.004-2 Β· Apache-2.0
- debian trixie: libtie-handle-offset-perl 0.004-2 Β· Apache-2.0
- ubuntu noble: libtie-handle-offset-perl 0.004-2 Β· Apache-2.0
- ubuntu resolute: libtie-handle-offset-perl 0.004-2 Β· Apache-2.0
- ubuntu stonking: libtie-handle-offset-perl 0.004-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms