in reply to WWW::Mechanize for page source

From the WWW::Mechanize documentation:

Please note that Mech does NOT support JavaScript, you need additional software for that. Please check "JavaScript" in WWW::Mechanize::FAQ for more.

What part of this is unclear to you?

Searching this site for http://perlmonks.org/?node_id=3989;BIT=www%3A%3Amechanize%20javascript yields lots and lots of relevant discussion and alternatives. Please read them.