Sounds like you want to make an http request to an external url. Since you're just embedding perl in html you could just have a perl block that uses HTTP::Request and LWP::UserAgent to make that request. Something like this:
my $ua = LWP::UserAgent->new;
my $response = $ua->request( HTTP::Request->new( "GET", "http://https://api.twitter.com/1/users/show.json?screen_name=aplusk" ) );
my $data = $response->content();
Then have HTML::Mason do whatever you want it to do with the json $data
Sounds like you want to make an http request to an external url. Since you're just embedding perl in html you could just have a perl block that uses HTTP::Request and LWP::UserAgent to make that request. Something like this:
Then have HTML::Mason do whatever you want it to do with the json
$data