duckduckgo / p5-app-duckpan

DuckDuckHack OpenSource Development Application
http://metacpan.org/module/App::DuckPAN
Other
53 stars 47 forks source link

Problem with duckpan server in Web.pm and Server.pm #99

Closed HackOrQuack closed 10 years ago

HackOrQuack commented 10 years ago

Whenever I run duckpan server I recieve the following errors:

Starting up webserver...

You can stop the webserver with Ctrl-C

keys on reference is experimental at /home/user/perl5/lib/perl5/App/DuckPAN/Web.pm line 360.
Compilation failed in require at /home/user/perl5/lib/perl5/App/DuckPAN/Cmd/Server.pm line 167.

Although I have the most up to date version available of App::DuckPAN from cpanm my local files are very slightly different to those here on github.

Line 360 of Web.pm refers to:

} keys $calls_template{$spice_name});

which is line 357 of the current github version (44c1aac)

Line 167 of Web.pm refers to:

require App::DuckPAN::Web;

which is line 164 of the current github version (e1378ec)

I'm running Arch linux

moollaza commented 10 years ago

@HackOrQuack thanks a lot for mentioning this -- I believe the difference in the line numbers is because the installed version of the files will have a few extra lines of text added to them thanks to DZIL -- If you compare the first few lines you'll see some extra info about the installed version that looks like this:

BEGIN {
    $App::DuckPAN::Web::AUTHORITY = 'cpan:DDG';
}
# ABSTRACT: Webserver for duckpan server
$App::DuckPAN::Web::VERSION = '0.137';

Btw, what version of Perl are you using? We test with 5.10, 5.14 and 5.16 and we use 5.16 regularly. I'm not seeing that warning but it does look like using keys on references was introduced in 5.14 -- I'll switch to 5.14 and see what happens...

moollaza commented 10 years ago

Nothing with 5.14, or 5.18, trying 5.21...

HackOrQuack commented 10 years ago

I'm using perl 5.20.0-5 it's the latest version available from the arch repositories.

moollaza commented 10 years ago

Couldn't replicate with 5.21 either, I'll try 5.20 now... not that it should matter, but are you running this in the Goodie or Spice repo?

HackOrQuack commented 10 years ago

I'm running it with the Spice repo.

jagtalon commented 10 years ago

Perl 5.20 now shows a warning for this and it looks like we have to fix it. See https://metacpan.org/source/RJBS/perl-5.20.0/pod/perldiag.pod#L2708 for the documentation.

Some projects have started to fix it, too: https://github.com/taunger/Config-Source/blob/master/Changes#L9

jagtalon commented 10 years ago

It's now treated as a severe warning (S) A severe warning (enabled by default).

moollaza commented 10 years ago

@jagtalon thanks for finding that -- really odd that it didn't occur in 5.21, I didn't get around to testing 5.20 but will try and confirm, then fix

moollaza commented 10 years ago

Made a PR ^, should be good now :). Thanks again for reporting this @HackOrQuack