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::RequireBlockGrepUser Contributed Perl DocumentaPerl::Critic::Policy::BuiltinFunctions::RequireBlockGrep(3)

NAME
Perl::Critic::Policy::BuiltinFunctions::RequireBlockGrep - Write "grep { $_ =~ /$pattern/ } @list" instead of "grep /$pattern/, @list". AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
The expression forms of "grep" and "map" are awkward and hard to read. Use the block forms instead. @matches = grep /pattern/, @list; #not ok @matches = grep { /pattern/ } @list; #ok @mapped = map transform($_), @list; #not ok @mapped = map { transform($_) } @list; #ok CONFIGURATION
This Policy is not configurable except for the standard options. SEE ALSO
Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval Perl::Critic::Policy::BuiltinFunctions::RequireBlockMap AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.16.3 2014-06-09 Perl::Critic::Policy::BuiltinFunctions::RequireBlockGrep(3)
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