Does the modules directory in your Apache2 directory in fact contain mod_perl.so and mod_apreq2.so?
Did you install Bundle::Apache2? If not, perl -MCPAN -e "install Bundle::Apache2"
Where did you put the code snippet you cite, and how did you invoke it?
Best thing to do would be to get a copy of "mod_perl2 User's Guide" by Stas Bekman and Jim Brandt: http://www.amazon.com/gp/offer-listing/0977920119/ref=dp_olp_used?ie=UTF8&qid=1253169502&sr=1-1&condition=used