in reply to How has Perl saved you time at your job this week|month|year|decade?

Recently I had a requirement to write program(in 1 day)
1) which sends ISO8583(for financial transactions) message to a server receives response and creates some temporary files, from where other program can take understandable information.
2) Logs all the request and response(output, debug message, error logs)
3) It should be easily maintainable,configurable,scalable,reliable
4) Target environment is only linux(x86).

it is not purely ISO8583 it is BASE24 which is based on ISO8583, I searched in CPAN and in GOOGLE about any perl modules for this purpose, but no help from there, I decided to write it of my own using Perl

I used Log::Agent for logging, I used IO::Socket:INET and IO::Select for socket connections, then my core module BASE24 for sending and receiving APIs, and a global configuration file(in perl, just hash and array references for STATIC definition of request and response fields, its length, its type, etc).

I was able to do this in one day time with some unit testing at my side. Second day it went live and started working. Thanks to Perl and its community.

I thoroughly agree with toolic
Within a few hours, I cranked out some decent Perl code to do the job. But, I must admit that hanging out at PerlMonks for the last couple years has given me the confidence and skills to rapidly converge on and implement a solution. A year and a half ago, I probably would have thrashed around for a few days or a week on that task, or perhaps I would have found the task too daunting.

Had I never joined, this...

* would have taken days to write, instead of hours
* would have been 5 times as many lines of code
* would have been more poorly laid out
* would certainly have more bugs

Instead, what I have...

* entire API structure in STATIC hash and array references, which is easily configurable(by developers atleast).
* performs error checking & reporting at every subroutine(at every stage) of the program.
* maintains the relevant info in a data structure which facilitates mapping of request and response properly
* socket connections, sending and receiving API was done with proper modules in an abstract way.
* with proper comments.


Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.
  • Comment on Re: How has Perl saved you time at your job this week|month|year|decade?