Hello Everybody !,
I would like to automate a part of my script. And think that overriding the
exit() might be the solution.
This what I need to do.
For every request to an cgi script I need to perform two things
1. Some operations before executing the actual script. ( like loading
preferences , writing to logs etc., ) .
2. Some operations at the end of execution reset the params (like saving the
changes in
preferences, writing to logs etc.,)
I am able to achieve the (1) first part by adding a "require file" to each
script. And following the same pattern for the (2) second part I add a
statement to
call a subroutine at end of all scripts.
The first thing is fine but he second is bit inconvenient to as sometimes
the scripts has to end (for various reasons like errors in subs etc., ) at
any part of the script.
I feel if I override the main exit function in some way it would solve the
problem as this is called by default at the end.
Kindly let me know how I if this is correct way? and if so how can I do this
with interfering with exit() in other modules.
with regards
Rajeev Rumale
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rajeev Rumale
MyAngel.Net Pte Ltd., Phone :
(65)8831530 (office)
#04-01, 180 B, The Bencoolen, Email :
[EMAIL PROTECTED]
Bencoolen Street, Singapore - 189648 ICQ : 121001541
Website : www.myangel.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]