Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://665957]
help
Chatterbox?
[choroba]: Any Monks online that can check what went wrong?
[Copacetic]: Sorry, I've just discovered that it gives a useful error message if I select "preview" (as well as removing the "create" button for some reason). It was that my title wasn't long enough. Thanks for your help.
[choroba]: :-)

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2017-05-26 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?