This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
lib/perl5db.pl: Restore noop lock prototype
authorJames McCoy <vega.james@gmail.com>
Fri, 20 Mar 2015 02:55:18 +0000 (22:55 -0400)
committerTony Cook <tony@develop-help.com>
Wed, 15 Apr 2015 23:14:24 +0000 (09:14 +1000)
commit41ef2c66e0da6dfb04ded81b979f7081007a1add
tree5b9bf5710849b6b9842a47e1dc68a4330b881598
parent902d16915db2735c3a41f15ef8d95cf300c31801
lib/perl5db.pl: Restore noop lock prototype

cde405a6b9b86bd8110f63531b42d89590a4c56e removed the lock prototype
"because it's already a do-nothing weak keyword without threads".
However, that causes "perl -d threaded-script.pl" to complain

    lock can only be used on shared values at /usr/share/perl/5.20/perl5db.pl line 4101.
    BEGIN failed--compilation aborted at threaded-script.pl line 2.
    lock can only be used on shared values at /usr/share/perl/5.20/perl5db.pl line 2514.
    END failed--call queue aborted at threaded-script.pl line 2.
    Unbalanced scopes: 3 more ENTERs than LEAVEs

because threaded-script.pl's importing of threads::shared enable's
lock()'s non-noop behavior.  Restoring the lock() prototype fixes the
inconsistency between lock() and share() usage.

Signed-off-by: James McCoy <vega.james@gmail.com>
lib/perl5db.pl