Packy Anderson
- Website: packy.dardan.com/
- About: I *want* to blog about Perl.
Recent Actions
-
Commented on The first line of Perl_CGI script, env perl vs perl only, how different?
Also, the -w you see in the #!/usr/bin/perl -w is just passing the "enable warnings" flag to Perl. If you're using /usr/bin/env, you can do the same thing by putting #!/usr/bin/env -S perl -w However, I dislike using command line...
-
Commented on The first line of Perl_CGI script, env perl vs perl only, how different?
The difference doesn't have anything to do with Perl; it's how unix-like operating systems interpret files that start with a shebang (#!). The first part after the shebang is the pathname to the executable that will be called with the...
-
Posted Introducing JIRA::REST::Class to Packy Anderson
Over the past couple months, I've had to take over project management for my DarkPAN project at $EMPLOYER, and the software they're enamored of for that purpose is
Comment Threads
-
Aristotle commented on
The first line of Perl_CGI script, env perl vs perl only, how different?
Avoiding doing things on the shebang line is a matter of coding style and therefore subjective.
There is a much more important reason to avoid
-w
, which is objective: it’s not at all the same thing asuse warnings
. Whereasuse warnings
applies to the rest of the current scope,-w
is completely global. Under-w
, any module loaded directly or indirectly will have warnings forced on it, even if the module itself does not turn on warnings – which nowadays almost certainly means it was written to run without warnings. Theref… -
Kido Mitsuru commented on
The first line of Perl_CGI script, env perl vs perl only, how different?
Thanks, thanks Packy Anderson.
I am not perfect to understand what you say, but at least I am getting into it. It appears to me that the script starting with
#!/usr/bin/env perl
use strict;
use warnings;is popular nowadays. So, I will follow this way to see what will happen. I will also study your links too. Thanks, thanks so much.
-
Kido Mitsuru commented on
The first line of Perl_CGI script, env perl vs perl only, how different?
Hello! Aristotle, thanks for your comment. I will follow your opinion. Let me see. Thanks, thanks.
-
raf commented on
The first line of Perl_CGI script, env perl vs perl only, how different?
I've also seen this:
#!perl
And it seems to work like "#!/usr/bin/env perl" on Linux (i.e. $PATH is consulted), but it fails completely on macOS. Best avoided.
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.