Is it safe in Perl to cast references up and down the class hierarchy at runtime? It always appeared to work (on perl 5.8.7), but it doesn't seem to work on perl 5.8.4. I see nothing in the changelogs about this.
Look at this:
1..38
ok 1 - web servers started
beginning run
ok 2 - perlbal started
ok 3 - status response ok
ok 4 - one done
upgrading Perlbal::ClientHTTPBase=ARRAY(0x8839950)
event_read_put for Perlbal::ClientHTTPBase=ARRAY(0x8839950). content_length_remain = 0
-- what? It was just convered down the tree to a ClientHTTP!
ok 5 - Good PUT
ok 6 - two done
ok 7 - file good via disk
crash log: wrong class for Perlbal::ClientHTTPBase=ARRAY(0x8839950)
-- my assertion that the ref is wrong. should be ref $foo eq "Perlbal::ClientHTTP"
crash log: Perlbal::ClientHTTPBase::put_writeout('P
56
crash log: Perlbal::ClientHTTP::event_read_put('Per
crash log: Perlbal::ClientHTTP::event_read('Perlbal:
--- look at ite bounce around between ClientHTTP and ClientHTTPBase. ??
crash log: Danga::Socket::PostEventLoop() called at /usr/share/perl5/Danga/Socket.pm line 474
crash log: Danga::Socket::EpollEventLoop('Perlbal::S
crash log: eval {...} called at blib/lib/Perlbal.pm line 997
crash log: Perlbal::run() called at blib/lib/Perlbal/Test.pm line 124
crash log: Perlbal::Test::start_server('\x{a}LOAD vhosts\x{a}CREATE POOL a\x{a}\x{a}CREATE SERVICE ss\x{a} SET ss.listen...') called at t/3
2-selector.t line 56
ending run
So I'm confused. Is perl's method dispatch cache not being cleared?