in reply to accessing CGI object from a subroutine in another package.
That said, you have very bad design here. Subroutines should be independent and reusable whenever possible. You are requiring another, unreleated subroutine to have been used for this to work. For example, what if you wanted to modify your program in the future so it would not always print_at_form when it got the info to make an at job? It would be better to have create_at_job take $q as an argument, and pass it to _untaint as an argument (it would also be nice to rename _untaint into a more informative name like _get_untainted_time, so you can get an idea what it does just be looking at it's name.) It's not going to be much more code to do this, and it makes your code much easier to maintain.
Another note, I don't think letting people start at jobs like this is a good idea -- it opens you up to mean people who would overload your webserver with at started programs.
|
|---|