Skip to content

Instantly share code, notes, and snippets.

# perl6 -MNativeCall -e 'constant LIB = ( "mysqlclient" ); sub mysql_get_client_version(--> int32) is native(LIB) { * }; say mysql_get_client_version'
60111
# perl6 -MNativeCall -e 'constant LIB = sub { "mysqlclient" }; sub mysql_get_client_version(--> int32) is native(LIB) { * }; say mysql_get_client_version'
Cannot locate native library 'mysqlclient': mysqlclient: cannot open shared object file: No such file or directory
grammar SimpleCalc {
token TOP {
^^ <expr> $$
}
token expr {
<number> | <tree-op>
}
token tree-op {
#!/usr/bin/env perl
use strict;
use warnings;
# +
# + +
# ++ ++
# ++ ++++
#++++++++