$ perl -we'sub Foo { "Bar" } Foo -> method' Can't locate object method "method" via package "Bar" (perhaps you forgot to load "Bar"?) at -e line 1.