3 ms·
When I came back to Perl after about four years of working primarily in Python, this was the first question I asked, in the form of "How do I make my scripts te
by SwellJoe 9y ago
When I came back to Perl after about four years of working primarily in Python, this was the first question I asked, in the form of "How do I make my scripts testable as a library while also runnable as a command?"
It wasn't immediately apparent how to do it back then, and it took a little explaining to even get people on the same page about what I meant. But, it was a really nice thing in Python that I immediately missed when coming back to Perl. You don't need to know the word "modulino" to do it, though.
brian d foy first talked about the idea in Perl well over a decade ago but it was already common in Python (and probably other languages, Python is just where I saw it first).