Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Calling a module's function to be run in background

by braymond (Initiate)
on Jul 26, 2005 at 23:16 UTC ( [id://478403]=perlquestion: print w/replies, xml ) Need Help??

braymond has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have files with info in it that are created by various applications in unix. I want to monitor these files and report the lines back to a calling program. What I had in mind is to use modules, loaded dynamically with the eval function, that will be called by a main program. Each module will have predefined functions ('new', 'start' and maybe 'read'). Whenever the main program calls the 'start' function, the module will do its thing while the main program goes on starting other modules. Anyone has ideas how to call the 'start' functions and then either call a 'read' function or be notified that data is ready to be consumed?
  • Comment on Calling a module's function to be run in background

Replies are listed 'Best First'.
Re: Calling a module's function to be run in background
by esskar (Deacon) on Jul 26, 2005 at 23:55 UTC
Re: Calling a module's function to be run in background
by mrborisguy (Hermit) on Jul 26, 2005 at 23:49 UTC

    I would think you either have to fork to new processes, or use threads. If you went with forks, you'd probably have to have some sort of inter-process communication (maybe one of the IPC modules). I don't know anything about threads, so I wouldn't know how to help you there. Just trying to give you a little direction, hope this helps.

        -Bryan

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found