File::...Cygwin(3perl)

πŸ’– File::Spec::Cygwin(3perl) β€” bestie edition πŸ’–

okay so welcome to the Perl Programmers Reference Guide, and today we're decoding File::Spec::Cygwin(3perl) β€” the little Cygwin-flavored gremlin hiding inside your Perl install. it's giving niche but make it slay 🌸


✨ NAME ✨

File::Spec::Cygwin β€” methods for Cygwin file specs πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

require File::Spec::Cygwin; # Done internally by File::Spec if needed

fr fr, you basically never have to do this yourself β€” File::Spec pulls it in when it needs it. no cap. πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

go read File::Spec and File::Spec::Unix first, bestie, because this page is the remix. this package overrides the implementation of these methods, not the semantics. the vibe stays the same, only the plumbing gets a Cygwin glow-up ✨

🚨 real talk: this module is still in beta. Cygwin-knowledgeable folks are invited to offer patches and suggestions. if that's you, the group chat is open 🫢

🌈 canonpath

Any \ (backslashes) get converted to / (forward slashes), and then File::Spec::Unix canonpath() is called on the result. so it's a two-step: swap the slashes, then let Unix do its thing. iconic behavior honestly πŸ’–

🌸 file_name_is_absolute

True is returned if the file name begins with drive_letter:, and if not, File::Spec::Unix file_name_is_absolute() is called. so like: got a drive letter? instant yes. no drive letter? ok go ask Unix πŸ™ˆ

🧚 tmpdir (override)

Returns a string representation of the first existing directory from the following list, in this exact order:

$ENV{TMPDIR}
/tmp
$ENV{'TMP'}
$ENV{'TEMP'}
C:/temp

it goes down the list and the first one that actually exists wins, periodt πŸ‘‘

πŸ’€ careful tho: if you're running under taint mode, and the environment variables are tainted, they are not used. safety first, babes.

⭐ case_tolerant

This one overrides Unix. Cygwin case-tolerance depends on managed mount settings and, as with MsWin32, on GetVolumeInformation() $ouFsFlags == FS_CASE_SENSITIVE, indicating the case significance when comparing file specifications.

Default: 1 ✨


Copyright (c) 2004,2007 by the Perl 5 Porters. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 🫢


okay that's the whole page, you ate that πŸ’… and for the lore: this was perl v5.44.0, dated 2026-10-17, filed under the Perl Programmers Reference Guide. mwah πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND 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