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 means STDOUT.

πŸ‘‘ 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 getting STDOUT. 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