Perl::...veTest(3pm)

πŸ’– NAME πŸ’–

Okay bestie, welcome to the Perl::...veTest(3pm) page from User Contributed Perl Documentation β€” yes, that’s the header energy folded in right at the top. The policy itself is Perl::Critic::Policy::InputOutput::ProhibitInteractiveTest, and her whole thing is: use prompt() instead of -t. Periodt. 🫢

🌸 AFFILIATION 🌸

This Policy is part of the core Perl::Critic distribution. She’s core, she’s here, she belongs. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

The -t operator is fragile and complicated. Like, it’s giving β€œwhy is this so messy?” energy. When you are testing whether STDIN is interactive, it’s much more robust to use well-tested CPAN modules like IO::Interactive. That’s the vibe check: don’t DIY the interactive check with -t; use the good tested module. ✨

πŸŽ€ CONFIGURATION πŸŽ€

This Policy is not configurable except for the standard options. That’s it β€” no secret knobs, just the standard options and nothing more. πŸ™ˆ

⭐ AUTHOR ⭐

Chris Dolan <cdolan@cpan.org>

Copyright (c) 2006-2011 Chris Dolan.

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


πŸŽ€ That’s the whole page, bestie! Footer fairy says: perl v5.42.0, dated 2024-10-23, and it signs off as Perl::...veTest(3pm). Byeee! πŸ’…βœ¨

πŸ“¦ where this page comes from