After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782452 - Using #!/usr/bin/perl in scripts is not portable
Using #!/usr/bin/perl in scripts is not portable
Product: anjuta
Classification: Applications
Component: unknown
git master
Other Linux
: Normal normal
: ---
Assigned To: Anjuta maintainers
Anjuta maintainers
Depends on:
Reported: 2017-05-10 15:33 UTC by Ting-Wei Lan
Modified: 2017-05-25 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Ting-Wei Lan 2017-05-10 15:33:44 UTC
Running 'git grep' shows several scripts in anjuta use #!/usr/bin/perl.

$ git grep /usr/bin/perl
libanjuta/interfaces/!/usr/bin/perl -w
plugins/tools/scripts/!/usr/bin/perl -w

It is better to use '#!/usr/bin/env perl' to avoid hardcoding the path to perl in scripts because some systems install perl in different places. For example, FreeBSD uses /usr/local/bin/perl by default. It used to include a /usr/bin/perl symlink for compatibility, but the symlink was removed 2 years ago.

The only script I found that caused build failure on FreeBSD was plugins/tools/scripts/ I was not sure whether the usage of #!/usr/bin/perl in other scripts can cause build problems.
Comment 1 Sébastien Granjoux 2017-05-25 18:50:24 UTC
I have fixed this in the master branch. The fix will be available in the next release. Thank you.