-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Babcock wrote:
> If I have a perl module that test rock solid from the command line at
> accessing and returning its data, but fails when running through
> Apache/mod_perl/mason... how do I go about debugging this?
Quick answer: RTFM :(
http://www.masonhq.com/docs/manual/Devel.html#using_the_perl_debugger

Plugging in the Apache::DB is as easy as it could be. Using it could be
trickier. Just read the docs, you will get on the right track in
(almost) no time.

As for the "print() debugging", you should print() to "STDERR", so those
messages (usually) go to apache's errors log ("warn" could be better
though). Apache::Log can do the same, e.g. $r->log->debug(...).

For automated testing, take a look at Test::WWW::Mechanize (or it's
Test::WWW::Simple little brother).

> So far I'm using Data Dumper on the PM and CGI sides and using
> various print statements in the PM and I haven't made any headway. I
> think that something may have been caching even though I restart
> apache each time I make a change to the PM, because I was getting out
> of date data when I dumped the object.
"Caching" after "Apache restart"?! You really mean that? :))
I'm quite sure there's NO "restart" there. By "restart" I understand
"process shutdown", "process startup". There's no place for any caching
here. ;-)

cheers
- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----

iD8DBQFEyJQBtZHp/AYZiNkRAu5GAKDihKDrkOh8LzJjVy5qJZbjjTe5zQCfW/L4
q44ouGJ7r9M1C2FEHVMttb4=
=IvFZ
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to