Inspired by hpset and the huge number of 'suitable' HP printers around my work place I thought the world would find it useful to have a Perl module to submit various PCL commands to networked printers.
The module currently only has support to connect, query and change the display status messages however it has been left open so that others can easily add extra functionality as they need it.
Although written for comical purposes, how it has been written has been as a serious Perl module; one day I'll submit it to CPAN.
Hopefully you will find the module pretty easy to use. The following example should give you a good idea:
#!/usr/bin/perl
#
use strict;
use warnings;
use Net::PCL;
my $pcl = Net::PCL->new('printer.example.com');
my $id = $pcl->id;
print "Printer is a: '$id'\n";
if ( $pcl->message('ready', 'hello world') ) {
print STDERR "failed to set printer LCD ready status message\n";
$pcl->close;
exit 1;
}
$pcl->close;
exit 0;
Apart from a recent version of perl you should find the module runs with no problems as it does not come with any dependencies that would involve you raiding CPAN, hopefully.
The dowload can be found below in the Changelog.
First release, supporting new(), close(), id(), config(), lcd() and message().