+use serde::{Deserialize, Serialize};
+
+#[derive(Debug, Deserialize, Serialize)]
+pub struct Blubber(String);
+
#[perlmod::package(name = "RSPM::Foo142", lib = "perlmod_test")]
mod export {
use anyhow::{bail, Error};
println!("teststr called with {:?}", t);
Ok(())
}
+
+ #[export]
+ fn test_serde(value: super::Blubber) -> Result<(), Error> {
+ println!("got {:?}", value);
+ Ok(())
+ }
}
RSPM::Foo142::test($param->{x});
print "Was auto-vivified: " . (exists($param->{x}) ? "YES" : "NO") . "\n";
RSPM::Foo142::teststr($param->{x});
+
+RSPM::Foo142::test_serde("Hello");