Perl::...Select(3pm)
π NAME π
okay bestie, welcome to Perl::...Select(3pm) in the User Contributed Perl Documentation manual π
. This policy is literally Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect, and it's giving: use Time::HiRes instead of something like select(undef, undef, undef, .05) π«Ά.
πΈ AFFILIATION πΈ
This Policy is part of the core Perl::Critic distribution β¨. No cap.
π DESCRIPTION π
so Conway discourages the use of select() for performing non-integer sleeps π. Even though it's documented in perlfunc, it's something that generally requires the reader to read perldoc -f select to figure out what it should be doing π. Instead, Conway recommends that you use the Time::HiRes module when you want to sleep π΄.
select undef, undef, undef, 0.25; # not ok
use Time::HiRes;
sleep( 0.25 ); # ok
π CONFIGURATION π
This Policy is not configurable except for the standard options π . That's the whole story.
π¦ SEE ALSO π¦
Time::HiRes β go peek π.
π AUTHOR π
Graham TerMarsch <graham@howlingfrog.com> π
π COPYRIGHT π
Copyright (c) 2005-2011 Graham TerMarsch. 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 vibe check, bestie π source/version: perl v5.42.0; date: 2024-10-23 πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Perl-Critic 1.156.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms