>>>>> "SHC" == Shawn H Corey <[email protected]> writes:
SHC> Jeff Peng wrote: >> Hi, >> >> I have a module, and I wanted to make an alias with a function in that module. >> >> package abc; >> SHC> # declare the sub without defining it SHC> sub init_squid_for_reverseproxy; >> my $obj = abc->new; >> $obj->init_squid_for_reverseproxy; >> >> The error says: >> Can't locate object method "init_squid_for_reverseproxy" via package "abc" . SHC> Because the compiler doesn't know that it is a sub. that is incorrect. method calls are done at runtime and the compiler has nothing to do with them. the issue as i pointed out was that he didn't alias the sub to the correct package but to the literal package '__PACKAGE__'. uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
