On Sun, Nov 30, 2003 at 09:52:37PM -0800, Yitzchak Scott-Thoennes wrote: > On Sun, Nov 30, 2003 at 10:13:40PM +0200, Enache Adrian <enache@rdslink.ro> wrote: > > > > $ perl -e 'foo { bar => "baz" }' > > Can't locate object method "foo" via package "bar" (perhaps you forgot to load "bar"?) at -e line 1. > > $ perl -MO=Deparse -e 'foo { bar => "baz" }' | perl > > -e syntax OK > > Can't locate object method "foo" via package "baz" (perhaps you forgot to load "baz"?) at - line 1. > > > > Or maybe Perl itself is wrong ? > > No, you are feeding it indirect object syntax ("method object") where > object is a BLOCK. Deparse is just showing it as the equivalent -> > method call. But it's not equivalent; the error messages differ. RonaldThread Previous | Thread Next