On Wed Oct 27 01:21:39 2010, voropaev.andrey@gmail.com wrote: > One of my modules was defining constant INIT. After switching to > perl5.12 the module > stopped working and the error was > > Undefined subroutine &main::Needed called. > INIT failed--call queue aborted. > > This didn't make any sense because there's no such function Needed in > my module. I could > reduce the code to the following code > > ########################################################### > use strict; > > > MyPackage::close_cnx(); > > package MyPackage; > use strict; > > use constant INIT => 4; > > > sub close_cnx > { > my $self = shift; > init_action($self); > } > > sub init_action > { > my $self = shift; > return if $self->{Needed} <= $self->{count}; > callit($self->{ID}, INIT); > } > ##################################################### > > The funniest thing is, if you switch the positions of init_action and > close_cnx functions, > then no error is displayed and perl runs fine. This was caused by: commit f7461760003db2ce68155c97ea6c1658e96fcd27 Author: Zefram <zefram fysh.org> Date: Sun Nov 8 15:03:45 2009 +0100 Bareword sub lookupsThread Next