symlink(3pm)
π symlink β the PerlIO::via::symlink era π
okay bestie, gather round, because this is one of those tiny little Perl modules that does one (1) thing and does it iconically. It's PerlIO::via::symlink, a piece of the User Contributed Perl Documentation, and it's basically the group chat between you and your filehandles: you write, it symlinks. slay.
β¨ NAME β¨
PerlIO::via::symlink β PerlIO layers for create symlinks π¦
(not me leaving the original grammar exactly as it found it, we respect the source in this house)
β¨ SYNOPSIS β¨
here's the whole vibe, three lines, no notes:
open $fh, '>:via(symlink)', $fname;
print $fh "link foobar";
close $fh;
that's it. that's the whole main character moment. π
πΈ DESCRIPTION πΈ
so the PerlIO layer symlink lets you create a symbolic link just by writing to the file handle. yes fr fr, you don't call symlink() yourself, you just write and the layer handles it. lowkey genius.
here's the tea though β you need to write "link $name" to the file handle. that exact format. that's the whole contract.
π¨ and if the format does not match? bestie,closewill fail withEINVAL. it's giving "we had one job and the format was it." so write it right. π
π§ TEST COVERAGE π§
the receipts, unedited, because this module is fully covered and wants you to know:
----------------------------------- ------ ------ ------ ------ ------ ------
File stmt branch cond sub time total
----------------------------------- ------ ------ ------ ------ ------ ------
blib/lib/PerlIO/via/symlink.pm 100.0 100.0 n/a 100.0 100.0 100.0
Total 100.0 100.0 n/a 100.0 100.0 100.0
----------------------------------- ------ ------ ------ ------ ------ ------
100.0 across the board, periodt. the cond column is n/a, don't come for her. π
π«Ά AUTHORS π«Ά
Chia-liang Kao <clkao@clkao.org>
π COPYRIGHT π
Copyright 2004-2005 by Chia-liang Kao <clkao@clkao.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
okay and that's the whole page!! π this was symlink(3pm), straight out of perl v5.36.0, dated 2022-11-19 β tysm for reading bestie, go make some symlinks, and remember: format the write correctly or close will simply not. mwah πβ¨
π¦ where this page comes from
- debian bookworm: libperlio-via-symlink-perl 0.05-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libperlio-via-symlink-perl 0.05-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libperlio-via-symlink-perl 0.05-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libperlio-via-symlink-perl 0.05-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libperlio-via-symlink-perl 0.05-5 Β· 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