Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Term::ANSIScreen 1.42

    Download button

    No screenshots available
    Downloads: 349  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Autrijus Tang | More programs
    Perl Artistic License / FREE
    June 14th, 2006, 16:00 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Term::ANSIScreen description

    Term::ANSIScreen is a Perl module for terminal control using ANSI escape sequences.

    Term::ANSIScreen is a Perl module for terminal control using ANSI escape sequences.

    SYNOPSIS

    # qw/:color/ is exported by default, i.e. color() & colored()

    use Term::ANSIScreen qw/:color :cursor :screen :keyboard/;

    print setmode(1), setkey('a','b');
    print "40x25 mode now, with 'a' mapped to 'b'.";
    ; resetkey; setmode 3; cls;

    locate 1, 1; print "@ This is (1,1)", savepos;
    print locate(24,60), "@ This is (24,60)"; loadpos;
    print down(2), clline, "@ This is (3,15)n";

    setscroll 1, 20;

    color 'black on white'; clline;
    print "This line is black on white.n";
    print color 'reset'; print "This text is normal.n";

    print colored ("This text is bold blue.n", 'bold blue');
    print "This text is normal.n";
    print colored ['bold blue'], "This text is bold blue.n";
    print "This text is normal.n";

    use Term::ANSIScreen qw/:constants/; # constants mode
    print BLUE ON GREEN . "Blue on green.n";

    $Term::ANSIScreen::AUTORESET = 1;
    print BOLD GREEN . ON_BLUE "Bold green on blue.", CLEAR;
    print "nThis text is normal.n";

    # Win32::Console emulation mode
    # this returns a Win32::Console object on a Win32 platform
    my $console = Term::ANSIScreen->new;
    $console->Cls; # also works on non-Win32 platform

    Term::ANSIScreen is a superset of Term::ANSIColor (as of version 1.04 of that module). In addition to color-sequence generating subroutines exported by :color and :constants, this module also features :cursor for cursor positioning, :screen for screen control, as well as :keyboard for key mapping.

    NOTES

    All subroutines in Term::ANSIScreen will print its return value if called under a void context.

    The cursor position, current color, screen mode and keyboard mappings affected by Term::ANSIScreen will last after the program terminates. You might want to reset them before the end of your program.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Perl module | Term ANSIScreen | terminal control | Term::ANSIScreen | Term | ANSIScreen

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM