Changeset 69 for trunk

Show
Ignore:
Timestamp:
05/06/08 17:20:49 (8 months ago)
Author:
scott
Message:

Fixed about menu and nicklist issues with quit

  • quit wasn't removing users from the nicklist, fixed
  • "About editor" label changed to "about"
Location:
trunk/Curses-UI-POE
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/Curses-UI-POE/examples/irc_client

    r68 r69  
    7373 
    7474        printf "--- %s (%s) quit \"%s\"", $nick, $hostmask, $_[ARG1]; 
     75 
     76        $Curses->dropnick($nick); 
    7577    }, 
    7678 
     
    218220            { -label => 'Help',  
    219221              -submenu => [ 
    220                 { -label => 'About editor', -value => \&about_dialog } 
     222                { -label => 'about', -value => \&about_dialog } 
    221223              ] 
    222224            },  
  • trunk/Curses-UI-POE/t/session.t

    r65 r69  
    66use warnings FATAL => "all"; 
    77 
    8 use Test::Simple tests => 4; 
     8#use Test::Simple tests => 4; 
     9use Test; 
     10BEGIN { 
     11    plan tests => 4; 
     12} 
     13 
     14# I realize skip is supposed to be conditional, but I don't want the test to 
     15# run as normal and I do want it to be reported as skipped.  This test doesn't 
     16# work worth a damn in perl 5.006 and lesser. 
     17if ($] < 5.008) { 
     18    skip(1,"_start"); 
     19    skip(1,"yield"); 
     20    skip(1,"_stop"); 
     21    skip(1,"exit"); 
     22 
     23    exit; 
     24} 
    925 
    1026BEGIN { 
    11     open OLDERR, ">&", \*STDERR; 
    12     open OLDOUT, ">&", \*STDOUT; 
     27    if ($] >= 5.008) { 
     28        open OLDERR, ">&", \*STDERR; 
     29        open OLDOUT, ">&", \*STDOUT; 
    1330 
    14     open STDOUT, ">>", "/dev/null"; 
    15     open STDERR, ">>", "/dev/null"; 
     31        open STDOUT, ">>", "/dev/null"; 
     32        open STDERR, ">>", "/dev/null"; 
     33    } 
    1634} 
    1735 
     
    2038my $cui = new Curses::UI::POE inline_states => { 
    2139    _start => sub { 
    22         open STDOUT, ">>&=", \*OLDOUT; 
    23         open STDERR, ">>&=", \*OLDERR; 
     40        if ($] >= 5.008) { 
     41            open STDOUT, ">>&=", \*OLDOUT; 
     42            open STDERR, ">>&=", \*OLDERR; 
     43        } 
    2444 
    2545        ok("_start"); 
     
    3555    _stop => sub { 
    3656        ok("_stop"); 
    37         open STDOUT, ">>", "/dev/null"; 
    38         open STDERR, ">>", "/dev/null"; 
     57 
     58        if ($] >= 5.008) { 
     59            open STDOUT, ">>", "/dev/null"; 
     60            open STDERR, ">>", "/dev/null"; 
     61        } 
    3962    }, 
    4063}, -no_output => 1; # Lotta good -no_output does..