Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.

qq


In reply to Re: Sub-initiate needs help getting started by qq
in thread Sub-initiate needs help getting started by Lori713

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2024-04-23 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found