in reply to Perl Module Education
The use you're asking about is: Module->import(LIST); This snippet is actually very different from &{$Module{import}}(LIST). What you've got here is a method call.
A method call is basically a subroutine call, except for two important differences; a method call respects inheritance, and the method call automatically places the package name or object reference at the beginning of @_.
Module is the name of a package, and import is a subroutine defined in that package or inherited from another package.Module->import(LIST); # method call import Module (LIST); # alternate method call &Module::import('Module', LIST); # plain old subroutine call, no inhe +ritance
You can find out more about method calls in perlmod and perlmodlib, as well as Exporter, which provides a standard import method.
|
|---|