Using use
Using use
Por Thomas Klausner (domm) de Vienna.pm, Bicycle.pm Data: quinta-feira, 1 de setembro de 2005 10:20
Duração: 40 minutos Língua: Pode encontrar mais informação no site do palestrante:
Perl would be a rather boring and not very useful language if it wasn't for the nifty function called "use". And while "use" seems to be rather simple and straight-forward ("use Some::Module;") it is a very powerful tool if used right.
We will take a very close look at what happens during a simple "use Some::Module":
* Compile Time vs. Run Time
* Conversion of module name to filename
* %INC
* @INC
We will also look at various ways to alter @INC (push, lib, FindBin).
After those basics we turn our attention to the code beeing used, i.e. the "import" function and various implementations of it (Exporter, Exporter::*)
The fun begins with custom written "import" functions. We'll take look at several...
And if there's some time left it is going to be spend with coderefs-in-@INC.
If all of this doesn't sound too interesting, you should visit my talk anyway, if only to hear me trying to say "Waak::Gorshle" (there ain't no "foo" in my talk!) |