end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

ModPerl::MethodLookupによるmod_perl2のmethod調査

[error] [client 192.168.0.1] Can't locate object method "auth_name" via package "Apache2::RequestRec" at 〜
[error] [client 192.168.0.1] Can't locate object method "get" via package "APR::Table" at 〜

「Apache2::RequestRecからauth_name()を呼べるはずなのに呼べない」や「APR::Tableからget()を呼べるはずなのに呼べない」等の場合、次のようにModPerl::MethodLookupをコマンドラインから使うと、解決のヒントが得られます。

$ perl -MModPerl::MethodLookup -e print_method auth_name
To use method 'auth_name' add:
        use Apache2::Access ();

例えば、auth_name()は、Apache2::Access をuseする必要があります。

http://perl.apache.org/docs/2.0/api/ModPerl/MethodLookup.html