chinaxing has asked for the wisdom of the Perl Monks concerning the following question:
I know the __PACKAGE__ will be compiled as package name at compile time. so why i cann't use it this way:
in the Foo package's namespace?__PACKAGE__::bar()
this will cause the error :
Undefined subroutine &__PACAKGE__::bar called very thank you !
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: __PACKAGE__ variable cannot use as replace of package name
by moritz (Cardinal) on Apr 23, 2013 at 07:24 UTC | |
|
Re: __PACKAGE__ variable cannot use as replace of package name
by kcott (Archbishop) on Apr 23, 2013 at 08:16 UTC | |
|
Re: __PACKAGE__ variable cannot use as replace of package name
by choroba (Cardinal) on Apr 23, 2013 at 07:45 UTC |