Undefined subroutine &__PACAKGE__::bar called
First of all you misspelled PACKAGE, which is not a good thing to do.
But the real reason is that __PACKAGE__ is only handled specially when it's a term on it own, not when it's part of a name.
And finally __PACKAGE__ as a separate term becomes a string, and you can't write "MyPackage"::bar() either.
In reply to Re: __PACKAGE__ variable cannot use as replace of package name
by moritz
in thread __PACKAGE__ variable cannot use as replace of package name
by chinaxing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |