demerphq oryiufjngmailcom 103007 linda w wrote yves orton via rt wrote 102807 via rt linda walsh wrote bug report perl twaxvptwszvtlinxorg generated help perlbug 135 running perl v588 dummyboom ln 22 prog demonstrates three 3 oocall related problems perl autovivifies boom dummy sub laytrap ln 22 interferes oo calls blessed ref later program execution imo isnt bug may confusing behaviour bug works equivalent code would work hash referencing hash guaranteed check references parent returning failure nonlocal definition referencing subroutine referencing slot glob symbol table symbol tables hashes therefore behavior expected fact results behavior find suprising reflection misunderstanding subroutine calls method calls work dyanmic language error perls behaviour dont think part oo functionality major part method defined local checks parent classes taking reference subroutine involved method dispatch documented take reference parents subroutine therefore isnt bug error message tells user localclassmethod isnt found selfparentmethod user think know parent method wouldnt expect localclass doesnt standard oolookup returning undefined want oocall checks parents could tell call function local function instead selfmethod id use methodself using methodcall syntax selfmethod look parent classes method throwing undefinederror created subroutine stub symbol table perl assume reason perl doesnt know method stub created cant know something silly ignore dperl emy xfoo eval sub foo warn qqfoo x foo eval 1 line 1 dperl emy f rfx rtesting print fx testing similarity behavior unexpected given perls global symbol tables really hashes disguise hash table isnt something defined look parent classes methodcall symmetric method call supposed look entry current package failing finding one supposed look parents classes created one albeit unusual route perl found muddying water bringing method dispatch somehow make incorrect autovivification seem less fault mean computers dont normally ignore things programmers tell generally considered bug cant turn around say case perl know didnt really mean something pretend didnt code marked ln 22 quoted problem essentially creating function stub perl expects fill later havent filled since produces undesirable results simply shouldnt well solution others come one even knew reported bug confusing behaving oolanguage lookup supposed well told several times wrong nobody happened hit exact explanation would satisfied advice gave right correct something like dummy push dummyboom defined boomcode ln 22 takes reference sub actually defined yet another great workaround doesnt mean call blessedref shouldnt first parental method lookup throwing fatal error would parental lookup throwing undefined error doesnt optimized work thats nice bad doesnt match actually works given dont seem understand deeper implications working dynamic language dont think really good position determine one work another part really wrong user rely builtin function determine method safe call tried protect calls returns true reference samename undefined local function cant use definedselfmethod replacement selfcanmethod two issues first shouldnt create function stubs dont intend fill fact rather unusual mechanism annoying agree wrong second cant generally rely references subroutines regardless obtained means thing named dispatch would named method dispatch named subroutine dispatch example oryiufjngemini perl le sub foo print foo foo subfoo local foosub print bar foo sub foo bar foo say generally reason btw controlled circumstances rely behavior situation wasnt really would consider controlled circumstance acknowledge str8tforward fix one might like believe area hit often bug report numbers represent many perlexperts knew workaround couldnt say failed reams code riddled red flags fact code analysed plain simply wrong method dispatch really nothing wonder one hit exact reason would satisfied listened advice given instead discounting superstitious problem would gone away managed reduce less 10 lines code maybe would hit explanation would satisfied sifting 50 lines code riddled red flags fun especially person trying help argues red flags point narrowing point could get others understand bug felt handle well enough report bug took bit persistence id guess people wouldnt bother find root cause let along get point filing bug bug people would realized went oh ok doesnt expect instead want must bug doesnt yves perl mredebug e justanotherperlhacker thu 07 aug 2008 075822 0100 perl 46987 oocall failures autovivfunctions testing existence