title: Perl Curses::UI
body: <p>I am trying to use the library Curses:UI from <a href="http://search.cpan.org/dist/Curses-UI/" rel="nofollow noreferrer">http://search.cpan.org/dist/Curses-UI/</a>
  to build a UI on linux karmic.</p>
  
  <p>I can create a simple user interface e.g.:</p>
  
  <pre><code>#!usr/usr/bin/perl
  
  use strict;
  use Curses;
  use Curses::UI;
  
  $ui = new Curses::UI(-color_support=&gt;1,-clear_on_exit=&gt;1,-intellidraw=&gt;1);
  my $window = $ui-&gt;add('window', 'Window',-intellidraw=&gt;1);
  my $message = $window-&gt;add(-text=&gt;"Hello!",-intellidraw=&gt;1);
  $window-&gt;focus(); 
  $ui-&gt;mainloop();
  </code></pre>
  
  <p>Question: I need some way to  communicate informatio to the UI i.e. I have a loop which will wait for message to come and change the text in window. Once this message comes a popup will be displayed.
  Attempt:</p>
  
  <pre><code>my $ui = new Curses::UI(-color_support=&gt;1,-clear_on_exit=&gt;1,-intellidraw=&gt;1);
  my $window = $ui-&gt;add('window', 'Window',-intellidraw=&gt;1);
  my $message = $window-&gt;add(-text=&gt;"Hello!",-intellidraw=&gt;1);
  
  pseudocode
  while(true) #implemented a function to wait
  {
      popup($window-&gt;text("Hello how are you?"));
  }
  
  $window-&gt;focus(); 
  $ui-&gt;mainloop();
  </code></pre>
  
  <p>Problem: The above does not work. I am given a dark screen where my message is displayed. I have read the documentation and when I relocate : $ui->mainloop() above the while loop I am given the user interface but now nothing communicates to the window.</p>
  
  <p>Coincise Question: I need some way of displaying the user interface wait for inputs and display messages.</p>
  
  <p>Could anyone please help me on this? Thank you!</p>