Public bug reported:

I just downloaded and compiled stock Perl 5.24.1 without any Ubuntu
packages.

Then I put this in a file called foo.pl:

--cut
do 'froodle.conf';
print $froodle, "\n";
--cut

and this in froodle.conf:

--cut
$froodle = 'freedle';
--cut

Then I ran "perl foo.pl" with the stock Perl I had just compiled, and
saw this:

--cut
$ perl foo.pl
freedle
$ 
--cut

However, when I run "perl foo.pl" with the version of Perl included in
Zesty, I see this:

--cut
$ perl foo.pl

$
--cut

This is a serious, significant difference in behavior between stock Perl
and Ubuntu's Perl, and a regression from Yakkety.

Using "do EXPR" to get variable settings from configuration files is
even documented in the Perl documentation
(https://perldoc.perl.org/functions/do.html). You can't just break this.
:-/

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: perl 5.24.1-2ubuntu1
ProcVersionSignature: Ubuntu 4.10.0-19.21-generic 4.10.8
Uname: Linux 4.10.0-19-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.4-0ubuntu4
Architecture: amd64
CurrentDesktop: Unity:Unity7
Date: Sun Apr 16 16:11:29 2017
InstallationDate: Installed on 2016-01-16 (456 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: perl
UpgradeStatus: Upgraded to zesty on 2017-04-14 (2 days ago)

** Affects: perl (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug regression zesty

** Tags added: regression

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to perl in Ubuntu.
https://bugs.launchpad.net/bugs/1683179

Title:
  Variables set inside files executed with do not visible to script

Status in perl package in Ubuntu:
  New

Bug description:
  I just downloaded and compiled stock Perl 5.24.1 without any Ubuntu
  packages.

  Then I put this in a file called foo.pl:

  --cut
  do 'froodle.conf';
  print $froodle, "\n";
  --cut

  and this in froodle.conf:

  --cut
  $froodle = 'freedle';
  --cut

  Then I ran "perl foo.pl" with the stock Perl I had just compiled, and
  saw this:

  --cut
  $ perl foo.pl
  freedle
  $ 
  --cut

  However, when I run "perl foo.pl" with the version of Perl included in
  Zesty, I see this:

  --cut
  $ perl foo.pl

  $
  --cut

  This is a serious, significant difference in behavior between stock
  Perl and Ubuntu's Perl, and a regression from Yakkety.

  Using "do EXPR" to get variable settings from configuration files is
  even documented in the Perl documentation
  (https://perldoc.perl.org/functions/do.html). You can't just break
  this. :-/

  ProblemType: Bug
  DistroRelease: Ubuntu 17.04
  Package: perl 5.24.1-2ubuntu1
  ProcVersionSignature: Ubuntu 4.10.0-19.21-generic 4.10.8
  Uname: Linux 4.10.0-19-generic x86_64
  NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
  ApportVersion: 2.20.4-0ubuntu4
  Architecture: amd64
  CurrentDesktop: Unity:Unity7
  Date: Sun Apr 16 16:11:29 2017
  InstallationDate: Installed on 2016-01-16 (456 days ago)
  InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
  SourcePackage: perl
  UpgradeStatus: Upgraded to zesty on 2017-04-14 (2 days ago)

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to