Hi, I have a module, and I wanted to make an alias with a function in that module.
package abc; { # make an alias to another function no strict 'refs'; *{__PACKAGE__::init_squid_for_reverseproxy} = \&init_reverseproxy; } But this won't work when calling it: my $obj = abc->new; $obj->init_squid_for_reverseproxy; The error says: Can't locate object method "init_squid_for_reverseproxy" via package "abc" . Why? OK I simply updated the alias definition to: *init_squid_for_reverseproxy = \&init_reverseproxy; This works as I want. Is this the suitable one? Thanks. -- Jeff Peng Email: jeffp...@netzero.net Skype: compuperson -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/