libperl-rs 0.3.1

Embed perl5 runtime in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use libperl_rs::Perl;
#[allow(unused)]
use libperl_sys;

// cargo run --example 000_perl_parse -- -le 'use strict; $foo'
// This will print an error like following:
//
//   Global symbol "$foo" requires explicit package name (did you forget to declare "my $foo"?) at -e line 1.
//   Execution of -e aborted due to compilation errors.


fn main() {
    let mut perl = Perl::new();
    
    perl.parse(&["", "-e", r#"use strict; $foo"#], &[]);
}