Hi all there,

I'd like to use %subj% with caching options. I know how to use
Cache::File; or WWW::Mechanize::Cached.

Problem comes, when I want to cache webpage with forms (POST).
I decide not to use WWW::Mechanize::Cached, because it uses as key
given URL (as I decoded that from source).

I know how to make unique key with same URL and different POST using
Cache::File, but I dont know how to make from variable proper
Mechanize object and using mechanize methods ($mech->links,
$mech->forms and so on). Here is some snippet:

my $content = $cache->get( $key );
unless ($content) {
        $mech->get( $url );
        if ( $mech->success() ) {
                $content = $mech->content() ;
                #set to cache
                $cache->set( $key, $content );
        }
}
#now I need $content as $mech object, it is possible?
#I found how to "read" webpage from file, but not from variable.

Thanks, Brano




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to