3 ms·
I don't use CPAN. If I need something I don't want to write myself, I use the command line. To use RSA as an example, instead of trying to use a PGP module fro
by forgotmypw17 4y ago
I don't use CPAN. If I need something I don't want to write myself, I use the command line.
To use RSA as an example, instead of trying to use a PGP module from CPAN, I use the gpg command-line program, write its output to a file, and use that.
It's not as graceful, but it is also highly compatible with just OS packages.
- 4oo4 4y agoI bet you get better performance that way too. That kinda confirms my suspicions that Perl modules are awful to work with, though I'll admit I'm an idiot about the Perl ecosystem so there may be better module tools I don't know about. What makes you choose Perl over bash/sh then, if it's working as a "glue" between actual binaries? I imagine the text processing things it excels at?
- macintux 4y agoNot the person you’re responding to, but for me any time I have to perform any branching logic in a shell script I start reaching for Python or Perl.
- forgotmypw17 4y agoI would choose bash, but the syntax is just too awkward for me. I feel comfortable with parentheses, curly braces, freeform whitespace, etc., if/else, do/while, foreach, etc., and that's how I write my Perl. I sometimes call it "PHP style Perl", because most of the code i write can be copied and pasted almost verbatim between PHP and Perl, and I use this to my advantage. I don't use PHP a lot, but I do find it one of the most convenient ways to duct-tape things to a web server. On the whole, I've settled on a strategy of writing most code in such a way that it could have been written (with perfect foresight of the future) 20 years and go and have worked the whole time. I think of it as exploiting the Lindy Effect to my advantage. :)