Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Application Design Issue

by TedPride (Priest)
on Feb 04, 2008 at 13:55 UTC ( [id://665957]=note: print w/replies, xml ) Need Help??


in reply to Application Design Issue

Create a new module with a die wrapper, that stores the last place the user was at. It doesn't matter what the mechanism is - you can add / remove file markers, or you can store the position in a database (I recommend this for sure if you may run more than one user simultaneously) - but the wrapper will allow you to exit from any point with the desired action and only have to give a simple function call myDie($user, $position, $error)

Then of course you'll have another function that you run at the start that picks up the last user position, which is then used with conditionals to skip the parts you already covered. myPosition($user) Again, the mechanism isn't important, you can swap it around later if you feel like it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found