[ANN] Perl IPP API
Matthias Hilbig
necmas at gmx.de
Fri Nov 12 02:35:38 PST 2004
Hello,
I have just uploaded a Perl API to send and receive IPP Requests to CPAN.
Maybe some people reading this list could have a use for it.
The differencies between this API and the Perl scripting support in CUPS are:
- my Perl API consists only of Perl and doesn't use the Cups C API
- Perl like interface (See example at end of email)
You can either download the API from
http://www.cpan.org/authors/id/B/BI/BIGHIL/Net-IPP-0.1.tar.gz
or install it via the usual CPAN way:
perl -MCPAN -e shell
install Net::IPP::IPPRequest
Gruss
Matthias
Usage example:
use Net::IPP::IPPRequest qw(:all);
use Net::IPP::IPPRequest qw(:all);
my $request = {
&URL => "http://localhost:631/",
&REQUEST_ID => 1,
&OPERATION => &IPP_GET_JOBS,
&GROUPS => [
{
&TYPE => &OPERATION_ATTRIBUTES,
"attributes-charset" => "utf-8",
"attributes-natural-language" => "en",
"printer-uri" => "http://localhost:631/",
"which-jobs" => "completed"
}
]
};
my $response = ippRequest($request);
# the response has the same structure as the request.
More information about the cups
mailing list