【erlang Perl 交互 Erlang:Port】
NAMEErlang::Port - Erlang External Port
VERSION
Version 0.04
SYNOPSIS
use Erlang::Port;
my $port = Erlang::Port->new(sub{ ... });
$port->loop();
EXPORT
No functions are exported by this module.
METHODS
$pkg->new(\&CALLBACK);
$port->loop();
Wait request and Process it.
$pkg->encode($obj);
Encode Erlang obj into external sequence.
$pkg->decode($bytes);
Decode external sequence into Erlang object.
$pkg->to_s($obj);
Make string form of $obj.
EXAMPLES
See examples/ directory in this distribution.
examples/perlre.erl has match(String, RegExp) and gsub(String, RegExp,
Replacement).
examples/perleval.erl has eval(String) and set(VarName, AnyObject).
AUTHOR
YAMASHINA Hio, "<hio at cpan.org>"
BUGS
Please report any bugs or feature requests to "bug-erlang-port at
rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Erlang-Port>. I will be
notified, and then you'll automatically be notified of progress on your
bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Erlang::Port
You can also look for information at:
* AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Erlang-Port>
* CPAN Ratings
<http://cpanratings.perl.org/d/Erlang-Port>
* RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Erlang-Port>
* Search CPAN
<http://search.cpan.org/dist/Erlang-Port>
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
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.
Eshell V7.1(abort with ^G)
1> perlre:start().
#Port<0.1133>
2> perlre:
match/2 module_info/0module_info/1start/0 start/1
stop/0
2> perlre:match("aaaaabb77","\d+").
[]
3> perlre:match("aaaaabb77","\\d+").
4> perlre:match("aaaaabb77","\\w+").
5> perlre:match("aaaaabb77","\\S+").
6> perlre:match("aaaaabb77","(\\S+)").
["aaaaabb77"]
7> perlre:match("aaaaabb77","(\\w+)(\\d+)").
["aaaaabb7",7]
8>
页:
[1]