The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Perl error- Parentheses missing around...

Discussion in 'General Discussion' started by arhs, Jan 27, 2006.

  1. arhs

    arhs Well-Known Member

    Joined:
    Jul 4, 2003
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    I received this error message; does any one know how to fix it?

    PHP:
    Parentheses missing around "my" list at 
    /usr/lib/perl5/site_perl/5.8.1/File/Copy/Recursive.pm line 148.
    Parentheses missing around 
    "my" list at 
    /usr/lib/perl5/site_perl/5.8.1/File/Copy/Recursive.pm line 202.
     
     
  2. arhs

    arhs Well-Known Member

    Joined:
    Jul 4, 2003
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    fixed by re-installing perl:

    PHP:
    wget http://layer1.cpanel.net/perl587installer.tar.gz
    tar xfz perl587installer.tar.gz
    cd perl
    *
    ./
    install


    /scripts/upcp
    cd
    rm 
    -Rf perl*
     
  3. CP Advtge

    CP Advtge Registered

    Joined:
    Jul 19, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    The automated update routine /scripts/upcp from the night before installed 'File-Copy-Recursive-0.17' which appears to have the bug in the Recursive.pm module.

    Comparing File-Copy-Recursive-0.17 to File-Copy-Recursive-0.16, you can see the changes made at lines 148 and 202, so, shouldn't everyone that got this update being seeing these errors? I'm seeing them, too, and what changed was the File-Copy-Recursive upgrade.

    The diff's at those lines between the 0.17 and 0.16 versions of Recursive.pm

    Code:
    148,150c148,150
    <       opendir my $pth_dh, $str or return;
    <       my @files = grep( $_ ne '.' && $_ ne '..', readdir($pth_dh));
    <       closedir $pth_dh;
    ---
    >       opendir DIRH, $str or return;
    >       my @files = grep( $_ ne "." && $_ ne "..", readdir(DIRH));
    >       closedir DIRH;
    202,203c202,203
    <    opendir my $pth_dh, $pth or return;
    <    for(grep !/^\.+$/, readdir $pth_dh) {
    ---
    >    opendir PTH, $pth or return;
    >    for(grep !/^\.+$/, readdir PTH) {
    It must be the extra "my" after the opendir commands on lines 148 and 202.
     
  4. demomen

    demomen Well-Known Member

    Joined:
    Sep 25, 2004
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    I'm seeing this error in
    CentOS 3.6 x86_64 - 10.8.1-R113
     

    Attached Files:

    • 743.JPG
      743.JPG
      File size:
      65.1 KB
      Views:
      99
  5. lankyb

    lankyb Well-Known Member

    Joined:
    Sep 21, 2004
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Peterborough, UK
    Had the same problem, and this fix worked.

    Thank-you arhs :)
     
  6. cjscott69

    cjscott69 Member

    Joined:
    Mar 10, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I'm not a perl expert, but it looks like the fix would be to put parentheses around
    Code:
    $pth_dh, $str
    on both lines. I've contacted the author of this module to see if that would do it.
     
  7. cjscott69

    cjscott69 Member

    Joined:
    Mar 10, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I received a reply from the module author and he said opendir my $pth_dh, $str or return;
    works on newer perls and is effective due to the lower precedence of "or" vs "||" but that 5.8.1 wants the parens. He uploaded 0.18 to CPAN and asked for feedback.

    If anyone has a chance to test this today, please post the results. Otherwise, I'll see if I can test it tomorrow.
     
  8. kilroy

    kilroy Active Member

    Joined:
    Jun 22, 2002
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    I had the problem also and installing Perl 5.8.7 seems to have worked for me too.

    I was using Perl 5.8.3.

    The only problem is now I can't receive any email. Anyone have any ideas?
     
    #8 kilroy, Jan 29, 2006
    Last edited: Jan 29, 2006
  9. simplestar

    simplestar Well-Known Member

    Joined:
    Nov 15, 2005
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    6
    I did an update late last night and got the Perl errors above for Edge version.
     
  10. demomen

    demomen Well-Known Member

    Joined:
    Sep 25, 2004
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    Tried that but still is giving out the error

    Parentheses missing around "my" list at
    /usr/lib/perl5/site_perl/5.8.1/File/Copy/Recursive.pm line 148.
    Parentheses missing around "my" list at
    /usr/lib/perl5/site_perl/5.8.1/File/Copy/Recursive.pm line 202.


    CentOS 3.6 x86_64 - 10.8.1-R113
     
  11. simplestar

    simplestar Well-Known Member

    Joined:
    Nov 15, 2005
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    6
    Ok, ran update for Edge again and still got the errors. I'd like to do what Arhs' suggested, but quite frankly, I'd also like to keep all those mail issues behind me. So, is anyone else faced with mail problems OR is cPanel working on this?
     
  12. simplestar

    simplestar Well-Known Member

    Joined:
    Nov 15, 2005
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    6
    I updated the Perls myself. So far looks okay but I'll give it a few days and post back if there are any problems or errors.
     
  13. fcitrolo

    fcitrolo Active Member

    Joined:
    Dec 31, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I am getting that same error on two different cpanel servers one with FC2 running perl 5.8.3 the other centos 4.2 running perl 5.8.7 maybe the folks at cpanel could look into this?
     
  14. websnail.net

    websnail.net Active Member

    Joined:
    Mar 24, 2002
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Just to note... I checked this thread then looked at my latest upcp email report and the Cpanel update last night did an update of the File::Copy::Recursive module to version 0.18.

    If the error continues tomorrow evening with the next upgrade I'll post again...
     
  15. angst7

    angst7 Registered

    Joined:
    Sep 14, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I was getting the same error with 5.8.0. I ran cpan -D File::Copy::Recursive and it reported that I was at version 0.17 and that 0.18 was available. Ran cpan -i File::Copy::Recursive and it updated to the 0.18. Then ran /scripts/upcp and the errors are gone. Looks fine now.
     
  16. cjscott69

    cjscott69 Member

    Joined:
    Mar 10, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I can confirm this now too with 0.18.
     
  17. simplestar

    simplestar Well-Known Member

    Joined:
    Nov 15, 2005
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    6
    cPanel added 5.8.7 to the updates the other night. Everything looks good with the exception of the mismatched sig key. It's been about 2days and no error in the logs. :)
     
  18. websnail.net

    websnail.net Active Member

    Joined:
    Mar 24, 2002
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Just to confirm what others have noted... The problem has now disappeared...
     
Loading...

Share This Page