Andrew Gaffney wrote:

zsdc wrote:

First of all, using foreach will _always_ wait for all of the data before doing anything else, no matter what, so first change:

foreach (<MAKE>) {

to:

while (<MAKE>) {

Ok, so it was the 'foreach' causing my problem the whole time.

Good to know it's working now.


Here is my current code: [...]

This code works just fine providing that the Makefile commands don't output anything. Although, most Makefiles don't output anything except the commands being executed (which is covered by 'make -n' and compile errors. My next step is to add a "scrollback buffer" in order to display compile errors. I was thinking about something like:

Maybe take a look at the Curses or Curses::UI modules:


http://search.cpan.org/search?module=Curses
http://search.cpan.org/search?module=Curses::UI

It's basically a whole windowing environment in text mode. You can display the errors and other diagnostics in one or even more windows, while showing the progress in a progressbar. See:

http://search.cpan.org/search?module=Curses::UI::TextViewer
http://search.cpan.org/search?module=Curses::UI::Progressbar

--
ZSDC


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to