[SP-pm] Deveria Funcionar?

André Moura andreoandre at gmail.com
Tue Sep 16 11:00:47 PDT 2008


Veja > http://omor.com/perl/env.cgi

2008/9/15 Daniel de Oliveira Mantovani <daniel.oliveira.mantovani em gmail.com>:
> O importante é que o problema foi resolvido.
>
> Eu não entendi isso
>
> $ENV{HOME}/.cookies.txt
> Se alguém pudesse explicar.
> Obrigado
>
> 2008/9/15 Luis Motta Campos <luismottacampos em yahoo.co.uk>
>>
>> Daniel de Oliveira Mantovani wrote:
>> > Também não está funcionando, tem que por mais informações que nem a do
>> > Eden
>> > pois acima.
>> > use LWP::UserAgent;
>> > my $ua = LWP::UserAgent->new;
>> > $ua->timeout(10);
>> > $ua->cookie_jar({ 'JSESSIONID' => 'A898046DD481350D04CEDA944EAEF7DF' });
>> > my $response = $ua->get("$url");
>> > my $conteudo = $response->content;
>> >
>> > Acho que precisa do servidor, mas algumas coisas, eu olhei na Internet e
>> > não
>> > achei nada para por as opções.
>>
>> http://search.cpan.org/~gaas/libwww-perl-5.814/lib/LWP/UserAgent.pm
>>
>> RTFM:
>>
>>
>> ------ BEGIN LWP::UserAgent Documentation -----
>> $ua->cookie_jar( $cookie_jar_obj )
>>
>>    Get/set the cookie jar object to use. The only requirement is that
>> the cookie jar object must implement the extract_cookies($request) and
>> add_cookie_header($response) methods. These methods will then be invoked
>> by the user agent as requests are sent and responses are received.
>> Normally this will be a HTTP::Cookies object or some subclass.
>>
>>    The default is to have no cookie_jar, i.e. never automatically add
>> "Cookie" headers to the requests.
>>
>>    Shortcut: If a reference to a plain hash is passed in as the
>> $cookie_jar_object, then it is replaced with an instance of
>> HTTP::Cookies that is initialized based on the hash. This form also
>> automatically loads the HTTP::Cookies module. It means that:
>>
>>      $ua->cookie_jar({ file => "$ENV{HOME}/.cookies.txt" });
>>
>>    is really just a shortcut for:
>>
>>      require HTTP::Cookies;
>>      $ua->cookie_jar(HTTP::Cookies->new(file =>
>> "$ENV{HOME}/.cookies.txt"));
>> ------ END LWP::UserAgent Documentation -----
>>
>> O módulo que você está procurando é o HTTP::Cookie.
>>
>> Putamplexos.
>> --
>> Luis Motta Campos is a software engineer,
>> Perl Programmer, foodie and photographer.
>> _______________________________________________
>> SaoPaulo-pm mailing list
>> SaoPaulo-pm em pm.org
>> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>
>
>
> --
> Daniel de Oliveira Mantovani
> "A sede pelo aprendizado é insaciável"
> http://mantovanihouse.blogspot.com/
> ------------------------------------------------------------
>
> _______________________________________________
> SaoPaulo-pm mailing list
> SaoPaulo-pm em pm.org
> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>



-- 
André O Moura
http://andrem.wordpress.com


More information about the SaoPaulo-pm mailing list