#48316 Perl-5.20.3-328: Use of literal control characters in variable names is deprecated
Closed: wontfix None Opened 8 years ago by nhosoi.

perl-5.20.3-328.fc22.x86_64

setup-ds.pl and remove-ds.pl issues a warning:
Use of literal control characters in variable names is deprecated at /usr/lib64/dirsrv/perl/DSCreate.pm line 839.

 838     if (!defined($inf->{slapd}->{sasl_path})) {
 839         if ($^O ne "linux") {
                 ^^^
 840             $inf->{slapd}->{sasl_path} = "$inf->{General}->{prefix}@libdir@/sasl2";
 841         }
 842     }

Should we replace it with Config hash?

diff -twU4 DSCreate.pm.orig  DSCreate.pm
--- DSCreate.pm.orig    2015-10-20 16:07:11.319884719 -0700
+++ DSCreate.pm 2015-10-20 15:56:28.667355232 -0700
@@ -17,8 +17,9 @@
 package DSCreate;
 use DSUtil;
 use Inf;
 use FileConn;
+use Config;

 use Sys::Hostname;
 # tempfiles
 use File::Temp qw(tempfile tempdir);
@@ -835,9 +836,9 @@
         $inf->{General}->{ServerRoot} = "$inf->{General}->{prefix}/usr/lib64/dirsrv";
     }

     if (!defined($inf->{slapd}->{sasl_path})) {
-        if ($^O ne "linux") {
+        if ($Config{'osname'} ne "linux") {
             $inf->{slapd}->{sasl_path} = "$inf->{General}->{prefix}/usr/lib64/sasl2";
         }
     }

Replying to [ticket:48316 nhosoi]:

Should we replace it with Config hash?
{{{
diff -twU4 DSCreate.pm.orig DSCreate.pm
--- DSCreate.pm.orig 2015-10-20 16:07:11.319884719 -0700
+++ DSCreate.pm 2015-10-20 15:56:28.667355232 -0700
@@ -17,8 +17,9 @@
package DSCreate;
use DSUtil;
use Inf;
use FileConn;
+use Config;

use Sys::Hostname;
# tempfiles
use File::Temp qw(tempfile tempdir);
@@ -835,9 +836,9 @@
$inf->{General}->{ServerRoot} = "$inf->{General}->{prefix}/usr/lib64/dirsrv";
}

 if (!defined($inf->{slapd}->{sasl_path})) {
  • if ($^O ne "linux") {
  • if ($Config{'osname'} ne "linux") {
    $inf->{slapd}->{sasl_path} = "$inf->{General}->{prefix}/usr/lib64/sasl2";
    }
    }
    }}}

If that's what perl recommends, then yes.

I think this will work on all platforms, even on very old versions of perl

Thank you, Rich!

Yes, I verified it works with perl-5.10.1-141.

Ack, works for me (el7)

Reviewed by Rich and William (Thank you!!)

Pushed to master:
a534583..65362db master -> master
commit 65362db

Pushed to 389-ds-base-1.3.4:
a4c0a9e..c0d35f7 389-ds-base-1.3.4 -> 389-ds-base-1.3.4
commit c0d35f7

Metadata Update from @nhosoi:
- Issue set to the milestone: 1.3.4.5

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1647

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata