perlec - Perl Easy Call Interface


perlec documentation  | view source Contained in the perlec distribution.

Index


NAME

Top

perlec - Perl Easy Call Interface

VERSION

Top

Version 0.08

SYNOPSIS

Top

 perlec_t perlec;
 perlec_init(&perlec);

 str = "abc";
 re = "(\\w+)";
 matches = perlec_match(str, strlen(str), re, strlen(re), PERLEC_ROPT_NONE);

 result = perlec_eval("1+2");

 perlec_discard(&perlec);

DESCRIPTION

Top

perlec is a C library which enables embedding perl interpretor to your program simply.

FUNCTIONS

Top

perlec_init()

 void perlec_init(perlec_t* perlec);

Initializes perlec instance.

perlec_discard()

 void perlec_discard(perlec_t* perlec);

Discards perlec instance.

perlec_match()

 perlec_array_t* ret = perlec_match(perlec, str, str_len, re_len, flags);

NULL when compiling regexp is failed or does not match. if fail, perlec_errmsg returns scalar, and otherwise return NULL.

flags is bitwise-or of followings:

 PERLEC_ROPT_NONE
 PERLEC_ROPT_MULTILINE
 PERLEC_ROPT_SINGLELINE
 PERLEC_ROPT_IGNORECASE
 PERLEC_ROPT_EXTENDED
 PERLEC_ROPT_UTF8

perlec_replacement()

 perlec_scalar_t* ret = perlec_replacement(perlec, str, str_len, re, re_len, replacement, replacement_len, flags);

like STR =~ s/PATTERN/REPLACEMENT/g.

perlec_compile()

 perlec_rx_t* ret = perlec_compile(perlec, re, re_len, flags);

compile regexp pattern.

perlec_match_rx()

 perlec_array_t* ret = perlec_match_rx(perlec, str, str_len, rx, flags);

perlec_errmsg()

 perlec_scalar_t* ret = perlec_errmsg(perlec);

get $@ string.

perlec_eval()

 perlec_scalar_t* ret = perlec_eval(perlec, str, str_len);

eval string.

AUTHOR

Top

YAMASHINA Hio, <hio at cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-perlec at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=perlec. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc perlec

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/perlec

* CPAN Ratings

http://cpanratings.perl.org/d/perlec

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=perlec

* Search CPAN

http://search.cpan.org/dist/perlec

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


perlec documentation  | view source Contained in the perlec distribution.