FAQ
I upgraded Catalyst to 5.80016, and now restarting the dev server script with HUP makes it crash with this error:

Restarting server on SIGHUP...
Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.10.0/Catalyst/Engine/HTTP.pm line 342.

Here is Catalyst::Engine::HTTP line 342:

exec $^X, $0, @{ $options->{argv} };

I tried getting some argv in there by giving arguments to the server script, but it didn't fix it. So I edited HTTP.pm to this:

#exec $^X, $0, @{ $options->{argv} || [] };


And now it restarts okay when HUPed. Did I do something wrong or is this a bug? The script used to restart okay when HUPed before I upgraded.

thanks
Jim


Catalyst::Runtime is up to date (5.80016)
Catalyst::Devel is up to date (1.25).


_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/171222984/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100106/aa162ba1/attachment.htm

Search Discussions

  • Jim Dread at Jan 7, 2010 at 1:34 am
    Here are steps to make the server crash. Can anybody
    reproduce this problem please?


    # on linux
    catalyst.pl TestApp
    cd TestApp/
    perl Makefile.PL
    ./script/testapp_server.pl &
    kill -HUP %1

    # and then:
    Restarting server on SIGHUP...
    Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.10.0/Catalyst/Engine/HTTP.pm line 343.

    [1]+? Exit 10???????????????? ./script/testapp_server.pl



    _________________________________________________________________
    Hotmail: Trusted email with Microsoft?s powerful SPAM protection.
    http://clk.atdmt.com/GBL/go/196390706/direct/01/
  • Jay Shirley at Jan 7, 2010 at 3:16 am

    On Wed, Jan 6, 2010 at 5:34 PM, Jim Dread wrote:
    Here are steps to make the server crash. Can anybody
    reproduce this problem please?


    # on linux
    catalyst.pl TestApp
    cd TestApp/
    perl Makefile.PL
    ./script/testapp_server.pl &
    kill -HUP %1

    # and then:
    Restarting server on SIGHUP...
    Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.10.0/Catalyst/Engine/HTTP.pm line 343.

    [1]+? Exit 10???????????????? ./script/testapp_server.pl


    I can reproduce it, but only when using Catalyst::ScriptRunner.

    I think the problem is a disconnect there, where ->argv isn't being
    set. Looks like Catalyst::Script::Server isn't sending
    $options->{argv} as the default.

    The best solution is probably the fix you have, but this should be normalized.

    Added -dev to the list, as they'll be better at picking the right fix.

    -J
  • Tomas Doran at Jan 9, 2010 at 4:45 pm

    On 6 Jan 2010, at 06:13, Jim Dread wrote:

    I tried getting some argv in there by giving arguments to the server
    script, but it didn't fix it. So I edited HTTP.pm to this:

    #exec $^X, $0, @{ $options->{argv} || [] };

    And now it restarts okay when HUPed. Did I do something wrong or is
    this a bug? The script used to restart okay when HUPed before I
    upgraded.
    It's a bug.

    In fact, the thing you fixed is a bug, and the fact $options->{argv}
    isn't being passed is also a bug.

    Fixed: http://dev.catalystframework.org/svnweb/Catalyst/revision?rev557

    Cheers
    t0m

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJan 6, '10 at 6:13a
activeJan 9, '10 at 4:45p
posts4
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase