Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

perl::critic::policy::builtinfunctions::prohibitsleepviaselect(3pm) [debian man page]

Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaUsercContributed Perl DPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect(3pm)

NAME
Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect - Use Time::HiRes instead of something like "select(undef, undef, undef, .05)". AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Conway discourages the use of "select()" for performing non-integer sleeps. Although 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. SEE ALSO
Time::HiRes. 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. perl v5.14.2 2012-06-07 Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect(3pm)

Check Out this Related Man Page

Perl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSuUser(Contributed Perl DocPerl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSubstr(3pm)

NAME
Perl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSubstr - Use 4-argument "substr" instead of writing "substr($foo, 2, 6) = $bar". AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Conway discourages the use of "substr()" as an lvalue, instead recommending that the 4-argument version of "substr()" be used instead. substr($something, 1, 2) = $newvalue; # not ok substr($something, 1, 2, $newvalue); # ok The four-argument form of "substr()" was introduced in Perl 5.005. This policy does not report violations on code which explicitly specifies an earlier version of Perl (e.g. "use 5.004;"). CONFIGURATION
This Policy is not configurable except for the standard options. SEE ALSO
"substr" in perlfunc (or "perldoc -f substr"). "4th argument to substr" in perl5005delta 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. perl v5.14.2 2012-06-07 Perl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSubstr(3pm)
Man Page

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

undef

how to undef a readonly parameter? (2 Replies)
Discussion started by: tukuna82
2 Replies

2. Shell Programming and Scripting

please explain the command

Hi all , please explain the following command : perl -e 'select(undef,undef,undef,.15)' Thanks and Regards Navatha (2 Replies)
Discussion started by: Navatha
2 Replies

3. What is on Your Mind?

And now for something completely the same

In honor of the anniversary of one of the best British shows (and memoriam of Graham Chapman)... npjOSLCR2hE 9ZlBUglE6Hc (1 Reply)
Discussion started by: pludi
1 Replies

4. UNIX for Dummies Questions & Answers

Perl Experts - Need your help

Hi All, I need to take a dump of a table and load into excel and send as an attachment and for this am using a Perl script. I know the usual way of doing this by writing all the fields next to 'select' query and similarly writing into an excel as shown below ... (3 Replies)
Discussion started by: karthickrn
3 Replies

5. Programming

how to write a sub in Perl

hi, i am a really new to Perl. i have a following code that is working well. " i know this is really simple, but i cant figure out a way to do this. can someone help me please?:( (1 Reply)
Discussion started by: usustarr
1 Replies

6. Shell Programming and Scripting

Turn given time into HiRes time.

So, I know how to get the current time of the day using Time::HiRes. I'd like to be able to create a specific time I can use. I'm thinking I can take a POSIX timestamp and use 0 for the microseconds to create a HiRes version of of the time: Will this work? All I want to do is create a... (7 Replies)
Discussion started by: mrwatkin
7 Replies