Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Application Design Issue

by perlCrazy (Monk)
on Feb 04, 2008 at 11:49 UTC ( #665937=note: print w/ replies, xml ) Need Help??

in reply to Re: Application Design Issue
in thread Application Design Issue

I am creating step1_file that indicates that step1 has been executed successfully.
If any error comes then that step${n}_file will not be created.
How this to implement in main script.
Are you indicating something like, create label and then use GO TO ?

Comment on Re^2: Application Design Issue
Replies are listed 'Best First'.
Re^3: Application Design Issue
by stiller (Friar) on Feb 04, 2008 at 12:09 UTC
    I would read in (with glob) the step_X_done file. Read its number, or 1 into a variable $already_done

    for my $todo ($already_done .. $final_step){ do_step1() if $todo == 1; do_step2() if (-e step_1_done);
    then wrap the code for each step in separate subs.

    Now you can manually delete a "step-file" to have the job start from scratch, or at some spesific step, if you ever need that.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://665937]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2015-11-25 09:57 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (672 votes), past polls