Re: poll ideas quest 2019
by choroba (Cardinal) on Nov 06, 2019 at 15:04 UTC
|
Strict and warnings: what comes first?
- use strict; use warnings;
- use warnings; use strict;
Please explain why below.
Update: Credits use strict; before/after use warnings; and Re^2: use strict; before/after use warnings;.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
| [reply] [d/l] |
|
- use 5.18.3; use warnings;
How many know that 5.12.0 was the first release that implies strict with use version? (well, actually 5.11.0, but I hope nobody is using 5.11.x in production code)
(I don't care what version notation is used)
Enjoy, Have FUN! H.Merijn
| [reply] [d/l] |
|
As mentioned here, there might be some other options including -w and -W for warnings, and the implicit strict with use VERSION, but that would make a lot of possible answers if you were to enumerate all possible combinations...
And to answer the question, I put the more significant first, so version first (optional), because it is actually strict + features + minimal version, then strict (even after a version) because it is more restrictive (but less rewarningsive) than warnings, and at last warnings.
Edit: Oh, and if there's a package name, I always waste a few minutes deciding where I should put it, and then always add it after strict and warnings.
| [reply] |
|
| [reply] |
|
use strict;
use warnings;
is actually an attempt to
use less brain;
as it's a call for perl to do some of the thinking for you :) | [reply] [d/l] [select] |
|
|
Some people try to keep their use ...; declarations alphabetically sorted, saying that might help merges when multiple people add different uses... If one was to follow that route, use strict; would come before use warnings;.
| [reply] [d/l] [select] |
|
use 5.18.2;
use warnings;
use Carp;
use DB_File;
use DateTime;
use Data::Peek;
use File::Glob;
use XML::Simple;
use Time::HiRes;
use Text::CSV_XS;
use Sys::Hostname;
use Tie::Hash::DBD;
use File::Basename;
use Module::Refresh;
use Module::CoreList;
use HTML::TreeBuilder;
use DateTime::TimeZone;
use Proc::ProcessTable;
use Encode qw(encode decode);
Enjoy, Have FUN! H.Merijn
| [reply] [d/l] |
|
Ah yes, having so many use statements in a single file that you have to sort them to make them manageable, that happens all the time :'(. And having to add a bunch of modules in one go is common enough that two people do it in parallel on a daily basis. So annoying :/
| [reply] |
|
|
Re: poll ideas quest 2019 -- 2019 resolutions
by Discipulus (Canon) on Jan 01, 2019 at 15:37 UTC
|
2019 resolutions
In the starting year I'll want to learn:
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
| [reply] |
Re: poll ideas quest 2019: postfix dereference
by hippo (Bishop) on Jan 11, 2019 at 14:28 UTC
|
| [reply] |
|
- Only when replying to a dereference related question on PerlMonks or StackOverflow.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
| [reply] [d/l] |
Re: poll ideas quest 2019
by kschwab (Vicar) on Jan 01, 2019 at 15:26 UTC
|
After Perl5, I'm mostly interested in:
- Assembly
- C
- Cobol
- C#
- C++
- D
- Dart
- Fortran
- Go
- Haskell
- Java
- JavaScript
- Kotlin
- Lisp
- Lua
- Matlab
- Nim
- Objective C
- Perl6
- PHP
- Python
- R
- Ruby
- Rust
- Scala
- Scheme
- Smalltalk
- Swift
- Unixish Shell Scripting languages
- Visual Basic
- Other (post in comments)
(To get the other side of What programming language do you hate the most?)
| [reply] |
Re: poll ideas quest 2019: Gone sites
by hippo (Bishop) on Sep 29, 2019 at 12:39 UTC
|
In 2019 the site I miss most is
Edits: add perldesignpatterns.com (soonix), original perl.com (jdporter), tinymicros.com/pm (marto). Linkified (almost) all the things.
| [reply] |
|
| [reply] |
|
| [reply] |
|
| [reply] |
|
| [reply] |
Re: poll ideas quest 2019
by Eily (Monsignor) on Nov 21, 2019 at 16:12 UTC
|
| [reply] |
|
my $sth = $dbh->prepare (qq;
select foo, bar
from wobble
where barney = 42;
);
Enjoy, Have FUN! H.Merijn
| [reply] [d/l] [select] |
|
- q""
- qq''
- prefer here documents
| [reply] [d/l] [select] |
Did you ever write a program in Go?
by karlgoethebier (Abbot) on May 16, 2019 at 13:27 UTC
|
"Hello world!" counts.
But please note: This question might be hard to bear because it looks like Go isn't a TMTOWTDI language.
Yes []
No []
I thought it's a game []
Google is the root of all evil []
«The Crux of the Biscuit is the Apostrophe»
perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help
| [reply] [d/l] [select] |
|
Yes, but I didn't inhale []
Regards,
John Davies
| [reply] [d/l] |
|
| [reply] [d/l] |
|
|
Re: poll ideas quest 2019
by karlgoethebier (Abbot) on Aug 19, 2019 at 20:43 UTC
|
[] Because it doesn't make sense
[] Because it never will work
[] Because nobody implemented it
[] Because anything from Google is crap
[] Because i'm lucky with C/C++ and even Java
[] Other opinion (explain)
«The Crux of the Biscuit is the Apostrophe»
perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help
| [reply] [d/l] [select] |
|
| [reply] |
Re: poll ideas quest 2019
by karlgoethebier (Abbot) on Aug 23, 2019 at 14:18 UTC
|
[] Yes
[] No
[] Other opinion (explain)
Why i ask:
«The Crux of the Biscuit is the Apostrophe»
perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help
| [reply] [d/l] [select] |
Re: poll ideas quest 2019 (->new)
by Arunbear (Prior) on Mar 29, 2019 at 10:23 UTC
|
Poll ideas for April and beyond are most welcome of course.
| [reply] |