Data::Polipo - Perl extension for Polipo cache files
use Data::Polipo; my $p = new Data::Polipo ("o3kvmCJ-O2CcW2TH2KebbA=="); $p->status; # HTTP status $p->header->content_type; # Content-Type $p->header->x_polipo_location; # Polipo-specific header my $fh = $p->open; # Get file handle to read content my $content = <$fh>; # Read data from cache file
Data::Polipo is a module which allows you to get HTTP header and content data from Polipo's cache file.
None by default.
Open a cache file and returns a Data::Polipo object.
Returns the HTTP return status (like "HTTP/1.1 200 OK").
Returns an IO::File object to read the content data.
$p->header->field_name
returns header value of "Field-Name". field_name must be lower-cased and replaced "-" with "_". E.g. to get Content-Type header value, call like this:
$p->header->content_type
Polipo http://www.pps.jussieu.fr/~jch/software/polipo/, IO::File
Toru Hisai, <toru@torus.jp>
Copyright (C) 2009 by Toru Hisai
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.9 or, at your option, any later version of Perl 5 you may have available.
To install Data::Polipo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Polipo
CPAN shell
perl -MCPAN -e shell install Data::Polipo
For more information on module installation, please visit the detailed CPAN module installation guide.