Perl Monk, Perl Meditation | |
PerlMonks |
Re: Perl::Critic and the POSIX module.by cavac (Parson) |
on Jan 26, 2022 at 18:10 UTC ( [id://11140886]=note: print w/replies, xml ) | Need Help?? |
What operating system and version are you on? Do you use the perl interpreter installed by your OS or did you compile it yourself? Also, and this might be a stupid question, POSIX::setsid() actually work on your particular installation? I haven't looked into it for more than a few minutes, but it looks like the POSIX module does all kind of weird dynamic stuff on compile time (and probably on runtime as well) depending on your OS. For example, the Makefile.PL is full of stuff like this:
And even the .pm files have some nice stuff like: strerror => 'errno => BEGIN { local $!; require locale; locale->import} my $e = $_[0] + 0; local $!; $! = $e; "$!"', or
The astonishing thing here isn't that perlcritic has a hickup with stuff like that. It's astonishing that perlcritic gets it right more often than not under circumstance that are essentially "the module exports A B and C unless it is a full moon or the wind comes from the northeast, in which case the exports are A D and C and if you change the order of the exports the thing will instantly collapse into a black hole and take your project with it".
perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'
In Section
Seekers of Perl Wisdom
|
|