Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Application Design Issue

by TedPride (Priest)
on Feb 04, 2008 at 13:55 UTC ( #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.


Comment on Re: Application Design Issue
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-07-28 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (195 votes), past polls