Skip to content

sanko/Cancer.pm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status Actions Status Actions Status MetaCPAN Release

NAME

Cancer - I'm afraid it's terminal...

SYNOPSIS

use Cancer;

DESCRIPTION

Cancer is a text-based UI library inspired by termbox-go. Use it to create TUI in pure perl.

Functions

Cancer is needlessly object oriented so you'll need the following constructor first...

new( [...] )

my $term = Cancer->new( '/dev/ttyS06' ); # Don't do this

Creates a new Cancer object.

The optional parameter is the tty you'd like to bind to and defaults to /dev/tty.

All setup is automatically done for your platform. This constructor will croak on failure (such as not being in a supported terminal).

hide_cursor( )

show_cursor( )

mouse( [...] )

    $term->mouse;

Returns a boolean value. True if the mouse is enabled.

    $term->mouse( 1 );

Enable the mouse.

    $term->mouse( 0 );

Disable the mouse.

cls( )

Immediatly clears the screen.

render( )

Syncronizes the internal back buffer with the terminal. ...it makes things show up on screen.

title( $title )

Immediatly sets the terminal's title.

Author

Sanko Robinson sanko@cpan.org - http://sankorobinson.com/

CPAN ID: SANKO

License and Legal

Copyright (C) 2020-2023 by Sanko Robinson sanko@cpan.org

This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See http://www.perlfoundation.org/artistic\_license\_2\_0. For clarification, see http://www.perlfoundation.org/artistic\_2\_0\_notes.

When separated from the distribution, all POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See http://creativecommons.org/licenses/by-sa/3.0/us/legalcode. For clarification, see http://creativecommons.org/licenses/by-sa/3.0/us/.

Releases

No releases published

Sponsor this project

 

Packages

No packages published