I'm writing unit tests around some old code, and find the need to write a mock around Apache2::Request's read()
method
my $r = Apache2::Request->new(...);
$r->read(my $buf, $len);
Is there a way to write a function in Perl to populate $buf
? I'm pretty sure the only way to do that is from XS code with a **, but I thought I'd at least ask first.
Using Apache2::Request directly leads to this, hence my desire to mock it.
perl: symbol lookup error: .../APR/Request/Apache2/Apache2.so:
undefined symbol: modperl_xs_sv2request_rec
read
, is that correct? – Ligature$_[1]
. – Yeryerevan