Jean-Damien Durand > MarpaX-Database-Terminfo-0.010 > MarpaX::Database::Terminfo::String

Download:
MarpaX-Database-Terminfo-0.010.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.010   Source  

NAME ^

MarpaX::Database::Terminfo::String - Parse a terminfo string using Marpa

VERSION ^

version 0.010

SYNOPSIS ^

    use strict;
    use warnings FATAL => 'all';
    use MarpaX::Database::Terminfo::String;
    use Log::Log4perl qw/:easy/;
    use Log::Any::Adapter;
    use Log::Any qw/$log/;
    #
    # Init log
    #
    our $defaultLog4perlConf = '
    log4perl.rootLogger              = WARN, Screen
    log4perl.appender.Screen         = Log::Log4perl::Appender::Screen
    log4perl.appender.Screen.stderr  = 0
    log4perl.appender.Screen.layout  = PatternLayout
    log4perl.appender.Screen.layout.ConversionPattern = %d %-5p %6P %m{chomp}%n
    ';
    Log::Log4perl::init(\$defaultLog4perlConf);
    Log::Any::Adapter->set('Log4perl');
    #
    # Parse terminfo
    #
    my $stringSourceCode = "\\E[%i%p1%d;%p2%dH";
    my $stringSubObject = MarpaX::Database::Terminfo::String->new();
    my $stringSub = stringSubObject->parse(\$stringSourceCode)->value;

DESCRIPTION ^

This module parses a terminfo string and produces an anonymous subroutine from it. If you want to enable logging, be aware that this module is a Log::Any thingy. This module is inheriting the value() method from MarpaX::Database::Terminfo.

SUBROUTINES/METHODS ^

new($class)

Instantiate a new object. Takes no parameter.

parse($self, $bufferp)

Parses a terminfo database. Takes a pointer to a string as parameter.

SEE ALSO ^

Unix Documentation Project - terminfo

GNU Ncurses

AUTHOR ^

jddurand <jeandamiendurand@free.fr>

CONTRIBUTOR ^

Jean-Damien Durand <jeandamiendurand@free.fr>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Jean-Damien Durand.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: