On 13 Dec 2005, at 12:46, Peter Speltz wrote:
I'm using mod_perl. Basically I want to be able to set the $r->output
or a template variable to the output from another uri. Something like
this in the model:
$r->output = wget 'https://secure.myoldsite.net/beer';
I don't think there's a particular way to do it. One solution would be:
For a start I'd use LWP::simple, or WWW::Mechanize for that kind of
thing, depending on the complexity of your needs (i.e. either trivial
or not trivial - wget is handy but probably not here).
Then I'd stash the output of either of those modules into somewhere
in $r (probably in template_args), and then have a template that
serves up the portion of $r to the user when they visit http://
my.host.name/app/external_data/ or wherever.
It would be easy to start caching things in your database - use the
Net::Amazon example in Manual::Request (code in SVN docs is cleaner)
as a starting base for this kind of thing.
Cheers
kd
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-users mailing list
Maypole-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maypole-users