[Bug 1608268] Re: exported bash functions cannot be executed from perl

LocutusOfBorg costamagnagianfranco at yahoo.it
Mon Aug 1 07:01:56 UTC 2016


** Changed in: perl (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to perl in Ubuntu.
https://bugs.launchpad.net/bugs/1608268

Title:
  exported bash functions cannot be executed from perl

Status in perl package in Ubuntu:
  Incomplete

Bug description:
  This fails when using the perl version distributed with Ubuntu 16.04.1
  LTS:

      myfunc() { echo OK $*; }
      export -f myfunc
      seq 3 | perl `which parallel` myfunc

  giving:

      /bin/bash: myfunc: command not found
      /bin/bash: myfunc: command not found
      /bin/bash: myfunc: command not found

  (parallel = GNU Parallel)

  This fails when using the perl version distributed with Ubuntu 16.04.1
  LTS:

      myfunc() { echo OK $*; }
      export -f myfunc
      perl `which parallel` myfunc ::: 1 2 3

  giving:

      OK 1  (Surprisingly it works for the first job!?!)
      /bin/bash: myfunc: command not found
      /bin/bash: myfunc: command not found

  It works as expected on the perl version distributed with Ubuntu 14.04.4 LTS,
  Debian 7.8, Redhat 9, Centos 5, MacOS X.

  I downloaded and compiled the pristine source for
  perl-5.18.4  perl-5.20.3  perl-5.22.2  perl-5.24.0
  on Ubuntu 16.04.1 LTS. Then this works:

      myfunc() { echo OK $*; }
      export -f myfunc
      seq 3 | PERL5LIB=lib ./perl `which parallel` myfunc
      PERL5LIB=lib ./perl `which parallel` myfunc ::: 1 2 3

  All of this leads me to believe that a bug has been introduced in the
  58 patches.

  Failing perl version:

      $ perl --version

      This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
      (with 58 registered patches, see perl -V for more detail)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/perl/+bug/1608268/+subscriptions



More information about the foundations-bugs mailing list