4 ms·
New to me too. From the article: "In the Python world it is quite straight forward to make files work either as executables or as modules. In Perl it is a bit
by austinjp 9y ago
New to me too. From the article:
"In the Python world it is quite straight forward to make files work either as executables or as modules. In Perl it is a bit strange, but doable.
brian d foy has written a number of articles about Modulinos, but in nutshell a Modulino is a Perl file that can act both as an executable (a script that you would invoke directly) or as a module (Something you load into memory and expect to execute code only when you call one of its functions or methods)."
- sigzero 9y agoJust to add...one of the big reasons to do this is that testing that script now becomes much much easier as it is now a "module" and all the testing facilities in Perl can be brought to bear on it.