|
^^ Agreed "Perl Best Practices" by Damian Conway is hands-down the best perl book I have ever read, and (even though it is all perl) has a ton of general "do it right like this and here is why and why not" kind of advice for those of us that jump around languages a lot. It is formatted very similar to the Cookbook, but the answers are more focused on maintainability and clean coding practices rather than "look what I can do!" - which is what really bugs me about the cookbook. It really made me appreciate the language more, even as a really ocd-ish coder living in a perl shop. Perl Design Patterns is also a great resource, especially the Problem Index. Most of the common big-picture / refactoring problems found in perl applications are targeted there with suggestions for a clean design fix. Also, everyone should use Inside-Out Objects and be happy.
|
# ¿ Oct 26, 2007 11:05 |
|
|
# ¿ Apr 30, 2024 08:34 |
|
ashgromnies posted:I'm just unsure if perl6 will be released in time to be useful - they've been developing it since, what, 2000? So many other dynamic languages have been picking up speed and getting massive developer support - perl6 looks very cool, but I don't know how well it will fare since it seems like new projects written in perl are becoming less common and it's being used more to maintain legacy code. The best part of the whole Perl6 thing is the backporting of some of the cool and handy stuff from 6 for use in 5.x: See: Perl6::* on CPAN (Notice most of the cool ones are by Damien Conway, because he is awesome as all hell) While I am at it and kissing Conway's rear end, I also really reccomend the Getopt::Euclid module, which lets you write a perldoc explaining your script usage while ALSO using that same perldoc to know how to grab command opts and type checking them without extra work from you. For example, code:
* The help / usage / man flags will show the new command line option (duh) * User can specify --foo 2132142 without extra work from you * Your code can grab it as $ARGV{foo} (much prettier than the normal way of doing it via getopts or straight @ARGV) * Default is set somewhere sane * Input / type checking is done before it even GETS to your code, including proper error messages (you do NOT ever have to write type checking error messages for your input params again) So yea, not amazingly cool, but it is little stuff like that for perl that makes me love it. Someone just went "wait, this is the best way to express this common task just once and just make it work, so you can move on to the actual bizlogic code you get paid to write" - and I can get behind that kind of thinking. repeater fucked around with this message at 22:48 on Oct 26, 2007 |
# ¿ Oct 26, 2007 22:45 |