in reply to Subroutine not being found when being called from within its own module.
You're confusing a reference with a string , if you're using a string there is no \&
$ perl -le"sub Yoda::Says { warn join q/ / , @_ }; q{Yoda::Says}->( +q/hello/ ) ; " hello at -e line 1. $ perl -le"sub Yoda::Says { warn join q/ / , @_ }; q{Yoda::&Says}->( + q/hello/ ) ; " Undefined subroutine &Yoda::&Says called at -e line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Subroutine not being found when being called from within its own module.
by curucahm (Initiate) on Oct 13, 2015 at 22:56 UTC | |
by Anonymous Monk on Oct 13, 2015 at 23:02 UTC |