我正在围绕一些旧代码编写单元测试,并发现需要围绕Apache2 :: Request的read()方法编写一个模拟器
my $r = Apache2::Request->new(...); $r->read(my $buf,$len);
有没有办法在Perl中编写一个函数来填充$buf?我很确定这样做的唯一方法是使用带有**的XS代码,但我想我至少先问一下.
使用Apache2 :: Request直接导致了这一点,因此我想要嘲笑它.
perl: symbol lookup error: .../APR/Request/Apache2/Apache2.so: undefined symbol: modperl_xs_sv2request_rec