speedycgiの件、下記のようなコードです。なお、-r1オプションでは正しく動きます。
よろしくお願いします。
#!/usr/bin/speedy -w

use strict;
use warnings;
print "Content-type: text/plain; charset=utf-8\n\ntest";
require './lib/test.pm';

# test.pm
package test; print 'test2'; 1;