ExtUti...::File(3pm)
π ExtUtils::XSpp::Node::File π
okay bestie, so this is a page from the User Contributed Perl Documentation β the manual for ExtUtils::XSpp::Node::File(3pm). it's short, it's sweet, it's giving little-icon-that-does-one-thing-perfectly. let's go πΈ
β¨ NAME β¨
ExtUtils::XSpp::Node::File β the directive that picks the name of your output file. that's it, that's the job π
π DESCRIPTION π
so ExtUtils::XSpp::Node::File is a subclass of ExtUtils::XSpp::Node, and it represents a directive that changes the name of the file you're writing to. lowkey iconic.
you use it like this:
%file{file/to/write/to.xs}
and boom, output goes to that path. periodt.
there's also one special case, and it's kind of a big deal:
%file{-}
that little dash right there means output gets written to STDOUT instead of a file. yes, really. that's the whole trick. no cap π«Ά
π οΈ METHODS π οΈ
π¦ new
Creates a new ExtUtils::XSpp::Node::File. fresh out the box, brand new, main character energy β¨
Named parameters:
fileβ the path to the file that should be written to (or'-'). yes,'-'is allowed here too, and yes, it still meansSTDOUT.
π ACCESSORS π
π file
Returns the path of the file to write to (or "-" for STDOUT). like, it just hands you the path. simple. slay.
reminder bestie: if you hand it"-", you're not getting a file named "dash" β you're gettingSTDOUT. do not be surprised. i warned you π
and that's the whole page, fr fr β written by the Perl crew, shipped as part of perl v5.40.1, dated 2026-07-03. mwah, go write to some files (or don't, STDOUT is right there) πβ¨π
π¦ where this page comes from
- ubuntu stonking: libextutils-xspp-perl 0.1900-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