open-sw / pkg-cacher

This is a transparent cache for Debian and RedHat packages (.deb and .rpm). It is based on apt-cacher available on Debian. It has been enhanced to handle RedHat repositories and files whose names are the same but the contents are different.
15 stars 12 forks source link

pkg-cacher fails with Perl 5.18 #29

Closed ganto closed 9 years ago

ganto commented 10 years ago

Hi

I built and tried to run pkg-cacher on Debian Jessie which is using Perl 5.18.2. Unfortunately it fails with the following error:

Experimental "our" subs not enabled at /usr/share/pkg-cacher/pkg-cacher line 268.

After a bit of googling, I found that this seems a common issue for code running on Perl 5.18. If I add the following lines to the file, pkg-cacher will work again:

use feature 'lexical_subs';
no warnings 'experimental::lexical_subs';

I'm not at all familiar with perl so I don't know what the implications of this change are. Could you please have a look at this?

Cheers and thanks for this cool application :+1: ganto

Robert-Nelson commented 10 years ago

Just remove the word "our" it isn't needed. I put it there while troubleshooting a problem and forgot to remove it.

----- Original Message -----

| From: "Reto Gantenbein" notifications@github.com | To: "open-sw/pkg-cacher" pkg-cacher@noreply.github.com | Sent: Wednesday, July 16, 2014 3:11:18 PM | Subject: [pkg-cacher] pkg-cacher fails with Perl 5.18 (#29)

| Hi

| I built and tried to run pkg-cacher on Debian Jessie which is using Perl | 5.18.2. Unfortunately it fails with the following error: | Experimental "our" subs not enabled at /usr/share/pkg-cacher/pkg-cacher line | 268.

| After a bit of googling, I found that this seems a common issue for code | running on Perl 5.18. If I add the following lines to the file, pkg-cacher | will work again: | use feature 'lexical_subs' ; no warnings 'experimental::lexical_subs' ;

| I'm not at all familiar with perl so I don't know what the implications of | this change are. Could you please have a look at this?

| Cheers and thanks for this cool application | Reto

| — | Reply to this email directly or view it on GitHub .

Robert-Nelson commented 9 years ago

Fixed