develooper Front page | perl.perl5.porters | Postings from March 2012

Re: [perl #111300] [RESOLVED] eval does not catch die after alarm

From:
Matti Linnanvuori
Date:
March 30, 2012 04:06
Subject:
Re: [perl #111300] [RESOLVED] eval does not catch die after alarm
Message ID:
25340054-5A04-4CC4-88D3-49E2A2D74BB8@portalify.com
Hi!

I still think this is a bug. Perl manages to run to the end when run with option -d, but not without:

pmc-inst-test:~/routing # perl ack.t
1..7
Timeout
# Looks like your test exited with 4 before it could output anything.
pmc-inst-test:~/routing # perl -d ack.t

Loading DB routines from perl5db.pl version 1.3
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

1..7
main::(ack.t:39):	my $json_text = '{
main::(ack.t:40):	"timestamp" : 1328020064358,
main::(ack.t:41):	"sender" : "exchange.pmc.cassidian-in",
main::(ack.t:42):	"body" : {
main::(ack.t:43):	"type" : "ack",
main::(ack.t:44):	"version" : 1,
main::(ack.t:45):	"id" : "8f970b1b-f8a3-4c78-aa24-3b8e22056487",
main::(ack.t:46):	"from" : {
main::(ack.t:47):	"type" : "ssi",
main::(ack.t:48):	"address" : "12345"
  DB<1> c
not ok 1 - A message was received
#   Failed test 'A message was received'
#   at ack.t line 112.
#          got: 'Timeout
# '
#     expected: ''
not ok 2 - A JSON message received
#   Failed test 'A JSON message received'
#   at ack.t line 115.
#          got: 'malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at ack.t line 114.
# '
#     expected: ''
not ok 3 - sender exchange.pmc.router-in
#   Failed test 'sender exchange.pmc.router-in'
#   at ack.t line 116.
#          got: undef
#     expected: 'exchange.pmc.router-in'
not ok 4 - body the same
#   Failed test 'body the same'
#   at ack.t line 117.
#     Structures begin differing at:
#          $got = undef
#     $expected = HASH(0xcc5f68)
Use of uninitialized value $this in pattern match (m//) at ack.t line 118.
 at ack.t line 118
	eval '#line 118 ack.t
$test = $this =~ /$usable_regex/ ? 1 : 0
;' called at /usr/lib/perl5/5.10.0/Test/Builder.pm line 1407
	Test::Builder::_regex_ok('Test::Builder=HASH(0xa7c200)', undef, 'Regexp=SCALAR(0xeb9f58)', '=~', 'timestamp an integer') called at /usr/lib/perl5/5.10.0/Test/Builder.pm line 1087
	Test::Builder::like('Test::Builder=HASH(0xa7c200)', undef, 'Regexp=SCALAR(0xeb9f58)', 'timestamp an integer') called at /usr/lib/perl5/5.10.0/Test/More.pm line 421
	Test::More::like(undef, 'Regexp=SCALAR(0xeb9f58)', 'timestamp an integer') called at ack.t line 118
not ok 5 - timestamp an integer
#   Failed test 'timestamp an integer'
#   at ack.t line 118.
#                   undef
#     doesn't match '(?-xism:^\d+$)'
Use of uninitialized value in numeric ge (>=) at ack.t line 119.
 at ack.t line 119
not ok 6 - timestamp greater than or equal to that of before publishing
#   Failed test 'timestamp greater than or equal to that of before publishing'
#   at ack.t line 119.
Use of uninitialized value in concatenation (.) or string at ack.t line 119.
 at ack.t line 119
#  < 1333105488895
Use of uninitialized value in numeric le (<=) at ack.t line 123.
 at ack.t line 123
ok 7 - timestamp less than or equal to that of now
# Looks like you failed 6 tests of 7.
Debugged program terminated.  Use q to quit or R to restart,
  use o inhibit_exit to avoid stopping after program termination,
  h q, h R or h o to get additional info.  
  DB<1> 

regards, Matti Linnanvuori




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About