I have a module that is loaded inside a <%once> block, is there anyway to access the $r directly, short of passing it in?
ie: <%once> use My::Module; </%once> <%init> my $mod = new My::Module; my $cookies = $mod->get_cookies(); </%init> The My::Module package would have something like this: sub get_cookies { return Apache2::Cookie->fetch($r); } I'm trying to write an easy-to-use interface that accesses our web services data provider so it is convenient from a developer's standpoint within mason (ie: without having to re-write HTTP::Request, LWP, etc everytime), but I need to pass the session cookies along with the request: <%init> my $api = new My::API; my $results = $api->get('http://provider.com/api/get/this/stuff'); my $data = XMLIn($results, 'ForceArray' => 1); </%init> -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users