A little while back I posted about how I was enjoying getting back into Perl coding.
Well, I am still enjoying it and am rediscovering why Perl is a great development language.
Here we go...
CPAN
The CPAN is awesome, it is a central repository for Perl modules. Basically if you'd like to interface with something, check CPAN. So you want to automate a Telnet connection, grab the CPAN module, need an interface to Flickr, Nokia, PGP just go grab one of CPAN.
Next...
Perltidy
Perltidy, is simple, but worth it. Especially if you are planning on letting anyone else look at your code in the future. PerlTidy formats your code to some common standards. This helps improve the chances of your being able to read the code afterwards.
Perlcritic
Perlcritic, is very clever and I like to use it in conjunction with Perltidy. Perlcritic, analyses your code and gives suggestions on how to improve it. This is based on the concepts covered in Damian Conway's "Perl Best Practices" book. Again like Perltidy, it helps ensure you do not get lazy. It helps to ensure that the code you produce is "ok" based on generic standards.
test::more
Tests, tests, tests! Test driven development is the light side of the force! And Perl is great for test driven development. Test::more is a simple, powerful tool to run tests on your code.
SmokeTests
Okay, I am getting totally into smoke testing and running them continuously.
In fact I have been automating the running of PerlTidy, PerlCritic and my test suites via a smoke test script. So I call these three items from a script that is in a cron job, or just plain looping over and over. (I have been setting it to beep if a error shows up in the test suite. I pipe the perlcritic output to a file and review it, although there is a way to use perlcritic to only allow your code to improve which I hope to implement. And PerlTidy... it keeps the indentation etc right.
So with Perl it is immensely easy to setup a robust development environment, one that automates the boring tasks that lead to bugs. Using these tools, you prevent a huge number of errors creeping into your code. Specifically, silly errors, this allows you to focus on the logic and functionality.
Community
Finally and best, Perl has an awesome community, ask a good question on a site like www.perlmonks.org and you'll get expert help and advise. Not just from skilled coders, but often from people who built the components you are using.
Perl has been right at the centre of the open source movement from the beginning, it is a powerful web language but also hugely powerful for other applications. Which in my book perhaps moves it beyond the most common language it is compared to, PHP.
PHP is great, I do lots in PHP, but it is basically a web site language only. yeah it can do more than that of course, but that's where it is strongest IMHO at least. Python perhaps is a closer relation to Perl, although perhaps it is less a web language than perl. Ruby, etc.. no comment.
As for any M$ languages... well, no comment. ;)
So, I am back into Perl in a big way, I am loving my smoke tests calling PerlCrtic etc.
Give it a go.
Lance
Well, I am still enjoying it and am rediscovering why Perl is a great development language.
Here we go...
CPAN
The CPAN is awesome, it is a central repository for Perl modules. Basically if you'd like to interface with something, check CPAN. So you want to automate a Telnet connection, grab the CPAN module, need an interface to Flickr, Nokia, PGP just go grab one of CPAN.
Next...
Perltidy
Perltidy, is simple, but worth it. Especially if you are planning on letting anyone else look at your code in the future. PerlTidy formats your code to some common standards. This helps improve the chances of your being able to read the code afterwards.
Perlcritic
Perlcritic, is very clever and I like to use it in conjunction with Perltidy. Perlcritic, analyses your code and gives suggestions on how to improve it. This is based on the concepts covered in Damian Conway's "Perl Best Practices" book. Again like Perltidy, it helps ensure you do not get lazy. It helps to ensure that the code you produce is "ok" based on generic standards.
test::more
Tests, tests, tests! Test driven development is the light side of the force! And Perl is great for test driven development. Test::more is a simple, powerful tool to run tests on your code.
SmokeTests
Okay, I am getting totally into smoke testing and running them continuously.
In fact I have been automating the running of PerlTidy, PerlCritic and my test suites via a smoke test script. So I call these three items from a script that is in a cron job, or just plain looping over and over. (I have been setting it to beep if a error shows up in the test suite. I pipe the perlcritic output to a file and review it, although there is a way to use perlcritic to only allow your code to improve which I hope to implement. And PerlTidy... it keeps the indentation etc right.
So with Perl it is immensely easy to setup a robust development environment, one that automates the boring tasks that lead to bugs. Using these tools, you prevent a huge number of errors creeping into your code. Specifically, silly errors, this allows you to focus on the logic and functionality.
Community
Finally and best, Perl has an awesome community, ask a good question on a site like www.perlmonks.org and you'll get expert help and advise. Not just from skilled coders, but often from people who built the components you are using.
Perl has been right at the centre of the open source movement from the beginning, it is a powerful web language but also hugely powerful for other applications. Which in my book perhaps moves it beyond the most common language it is compared to, PHP.
PHP is great, I do lots in PHP, but it is basically a web site language only. yeah it can do more than that of course, but that's where it is strongest IMHO at least. Python perhaps is a closer relation to Perl, although perhaps it is less a web language than perl. Ruby, etc.. no comment.
As for any M$ languages... well, no comment. ;)
So, I am back into Perl in a big way, I am loving my smoke tests calling PerlCrtic etc.
Give it a go.
Lance