$ perl -wle 'sub foo { }; print __PACKAGE__->can("foo")' CODE(0x8812678) $ perl -wle ' print __PACKAGE__->can("foo")' Use of uninitialized value in print at -e line 1.