Perl without USE_PERL

Feeling brave I decided to uncheck USE_PERL for the build of perl on a new system. Now I found a port that stumbles over this (multimedia/ffmpeg).

Is it worth submitting a pr over this (fixing the shebang of doc/texipod2.pl)?
Is it pointless because everyone uses USE_PERL anyway?
Should this be fixed upstream by having ffmpeg look for perl properly?
 
No, in the config for perl.

When perl moved from base to ports they decided to create a symlink from the new /usr/local/bin/perl to the old /usr/bin/perl. This is basically a hack to prevent a lot of breakage, but I was wondering whether this hack is A. still needed and B. still wanted.
 
well, you need that, because most (probably all) perl scripts use
Code:
#!/usr/bin/perl

Even I code this way
It's not a bug (as this is what every perl programmer [Even on Linux] expect)
Otherwise every perl script should have to be patched to work on FreeBSD

That's my 2 cents
 
You don't need it, because you can just as easily write
Code:
#!/usr/local/bin/perl
and every port-maintainer can make sure every perl-file in their port uses the correct shebang.
Better yet, according to perldoc, you should use env when possible
Code:
#!/usr/bin/env perl
(I'll grant you the text seems ambiguous on this).

With the env-option in mind, I seriously doubt your claim that everyone that writes in perl uses /usr/bin/perl, do you have any numbers and/or sources to back that up?
Also, if everyone uses /usr/bin/perl as you say, shouldn't the USE_PERL-option have been removed from perl and the symlink created without asking?

Also note, that as far as I know, perl is the only port to use this "hack", I can't find any symlinks for bash or php for example. Comparing shebangs only, thank you.
 
OK, maybe I'm wrong... (My book of perl teaches to use /local/bin/perl, and probably all scripts I have seen use /local/bin/perl, however you're right about env)
 
OH said:
Feeling brave I decided to uncheck USE_PERL for the build of perl on a new system. Now I found a port that stumbles over this (multimedia/ffmpeg).

Is it worth submitting a pr over this (fixing the shebang of doc/texipod2.pl)?
Is it pointless because everyone uses USE_PERL anyway?
Should this be fixed upstream by having ffmpeg look for perl properly?

Submitting a pr does seem like the logical next step (& prs aren't just for massive, Earth-shattering problems in any case), though I don't see #1 & #3 as mutually exclusive.

As for #2, I have an irrational fear of non-optional options.
 
killasmurf86 said:
check this out
/usr/src/crypto/openssl/apps/CA.pl

It uses /usr/bin/perl. In the same directory CA.pl.in uses /usr/local/bin/perl and it gets worse:

Code:
root@desktop /usr]# grep -r "#\!/usr/bin/perl" src | wc -l
      74
root@desktop /usr]# grep -r "#\!/usr/local/bin/perl" src | wc -l
      83
root@desktop /usr]# grep -r "#\!/usr/bin/env perl" src | wc -l
      22

Granted, not all of those are perl-scripts, but it does seem to show that perl's switch from base to ports was not carried out with due diligence. This is also why I haven't yet filed a pr. This 'problem' should be looked at in a much wider sense than a single port or source-file.
 
russian perl
Code:
$ cat t.pl
#!/usr/bin/env perl

use utf8;

my $переменная = функция();
print $переменная;

sub функция {
    my $один = 1;
    my $два  = 2;

    $один + $два;
}
$ perl -l t.pl
3
 
Back
Top