Hi Dave, thanks for the extremely fast response. I would like to know if we might be able to help you with the subroutine/format bug? We are clearly not deep enough into the stuff to be able to effectively offer time, but perhaps we might help with money. Do you think we can be of any help, or shall we just wait until you come up with a bugfix? Our problem is, that we have to upgrade perl eventually, so we are in principle perfectly willing to contibute in order to get over that bug. I don't want to annoy you, so just give us a short notice, if you like. Best regards RĂ¼diger > On Mon, Jul 14, 2003 at 05:37:42AM -0000, Ruediger Schopper wrote: > > I belive, that we've found a bug in perl. We discovered it when changing from > > perl-5.4.4 to perl-5.8.0, where we got strange results with > > write in a program we heavily used without problems. > > The bug can be reduced to the simpler case: > > sub f ($); # Comment out to get right result! > sub f ($) { > my $test = $_[0]; > write; > format STDOUT = > @<<<<<<< > $test > . > } > f(1); > f(2); > > It's due to there being multiple CVs associated with f due to to the > forward declaration, and to newATTRSUB() copying the contents of the > second CV to the first. This causes any nested subs to have CvOUTSIDE > pointing to the wrong CV. A call to pad_fixup_inner_anons() fixes up any > nested anon subs, but nested formats aren't fixed up. > > Since I'm currently working on trying to get sub declarations > to take effect at the start of a sub rather than at the end (eg > sub f($) { f(1) }), I'll see if I can work in a fix for this at the > same time. > > -- > "You're so sadly neglected, and often ignored. > A poor second to Belgium, When going abroad." > Monty Python - "Finland" GPG/PGP-Key: wwwkeys.pgp.net:11371/pks/lookup?op=vindex&search=0x97A5CFE9&fingerprint=on Fingerprint = B44F 7109 A40F B383 AA1B 778D 43B9 767C 97A5 CFE9 _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ _/ _/ (`-'-,-. _. _/ _/ '._ (_ '.__.-, _/ _/ .-;`-.-`_..-' _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ `\___-.(_ _/ _/ _/ _.) a'-._ _/ RĂ¼diger Schopper _/ _/ __ .' `\ _/ schopper@usm.uni-muenchen.de _/ _/ .' ` ._^/ _/ _/ _/ _..._.-' /`\ / _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ _.' \ / ) _/ _/ _/ (/ / ) |/ _/ The surest sign that intelli- _/ _/ | | / ;-. _/ gent life in universe exists _/ _/ ;\ /'-.__.| /-. \ _/ is that none of it has tried _/ _/ / ) / | | '.\ _/ to contact us ! _/ _/ / /| / \ | || _/ _/ _/ | / / / | | / | _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ || \ \ | | \_/ _/ _/ )_`\ )_`\ )_`\ _/ _/ `""` `""` `""` _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ *** This message was entirely written with recycled electrons ***Thread Next