Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Best method for failure recovery?

by tommyw (Hermit)
on Sep 20, 2001 at 12:50 UTC ( [id://113550]=note: print w/replies, xml ) Need Help??


in reply to Best method for failure recovery?

What's wrong with:

my $recover = $opt_r; first() unless $recover>1; second() unless $recover>2;
etc. And then simply writing a numeric value to the recovery file.

I'd hope this was readable by anybody who knows English, without needing to know perl at all.

Incidentally, with your setup, I think that you're not going to set $rec_file_name, if your recovery flag is set, and since you've declared it with my, it's not going to be visible within the subroutines anyway.

Of course, you'd find this when writing production code: remember -w and strict are your friends :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (10)
As of 2024-04-18 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found