Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Sub-initiate needs help getting started

by qq (Hermit)
on Aug 26, 2003 at 22:36 UTC ( #286884=note: print w/replies, xml ) Need Help??

in reply to Sub-initiate needs help getting started

Good luck, first of all.

There is a lot of good advice given so far about how to write better code than you've been given, but I'd be wary of making large structural changes given your deadline. It certainly needs it, but I doubt its feasible in the time frame.

So here is a quick and dirty approach:

Do the subs all look roughly the same - if you squint? It may be that there is just one main sub per report and some helper functions. Given that the code is so long, its probably not well structured and may be very repetitous. If the new reports you need to create are similar to the existing ones, you can just copy and paste one of the existings subs and make modifications until it works.

If the subs don't all look the same, and aren't 'one per report', this approach won't work at all.

Another possible route is to not change the existing code at all, but write any new report code from scratch. In the .pl file have a simple exit clause near the top so that if one of the new reports need to be processed, you use the new code, or else fall through to the original mess.

If the existing code is considered broken, this won't work.

Two more random points:

  • If confidentiality clauses permit, feel free to post bits of code here for explanation.
  • If you are not already use an editor with syntax highliting (TextPad, UltraEdit, anything). It makes a lot of difference, even if you don't use a full blown IDE.

And again, good luck.


  • Comment on Re: Sub-initiate needs help getting started

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://286884]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2018-03-25 00:42 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (299 votes). Check out past polls.