Skip to content

Commit 3d562b0

Browse files
committed
Point out a way to detect OS in use
1 parent fda109d commit 3d562b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/Language/variables.pod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,8 @@ Other compile-time variables:
11061106
| "home directory" cannot be determined it will be L<Nil>
11071107
------------------+--------------------------------------------
11081108
$*SPEC | The appropriate L<IO::Spec> sub-class for the platform that
1109-
| the program is running on.
1109+
| the program is running on. For OS-specific code, simply use smartmatch:
1110+
| C<say "We are on Windows!" if $*SPEC ~~ IO::Spec::Win32>
11101111
------------------+--------------------------------------------
11111112
$*TMPDIR | An L<IO::Path> object representing the "system temporary directory"
11121113
------------------+--------------------------------------------

0 commit comments

Comments
 (0)