perlec - Perl Easy Call Interface
Version 0.08
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);
perlec is a C library which enables embedding perl interpretor to your program simply.
void perlec_init(perlec_t* perlec);
Initializes perlec instance.
void perlec_discard(perlec_t* perlec);
Discards perlec instance.
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_scalar_t* ret = perlec_replacement(perlec, str, str_len, re, re_len, replacement, replacement_len, flags);
like STR =~ s/PATTERN/REPLACEMENT/g.
STR =~ s/PATTERN/REPLACEMENT/g
perlec_rx_t* ret = perlec_compile(perlec, re, re_len, flags);
compile regexp pattern.
perlec_array_t* ret = perlec_match_rx(perlec, str, str_len, rx, flags);
perlec_scalar_t* ret = perlec_errmsg(perlec);
get $@ string.
$@
perlec_scalar_t* ret = perlec_eval(perlec, str, str_len);
eval string.
YAMASHINA Hio, <hio at cpan.org>
<hio at cpan.org>
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.
bug-perlec at rt.cpan.org
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
Copyright 2007 YAMASHINA Hio, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install perlec, copy and paste the appropriate command in to your terminal.
cpanm
cpanm perlec
CPAN shell
perl -MCPAN -e shell install perlec
For more information on module installation, please visit the detailed CPAN module installation guide.