Net::C...nation(3pm)
π NAME π
Net::CUPS::Destination β bestie, this is the CUPS Destination Object, and yes, it's giving iconic. π
(<small>the manpage itself is filed under Net::C...nation(3pm) if you were wondering where you even are rn</small>)
β¨ SYNOPSIS β¨
okay so here's the whole vibe in five lines, no cap:
use Net::CUPS::Destination;
my $printer = $cups->getDestination( "lj4200dn" );
my $name = $printer->getName();
my @options = $printer->getOptions();
my $jobid = $printer->printFile( $filename, $title );
πΈ DESCRIPTION πΈ
So Net::CUPS is an object oriented interface to the Common Unix Printing System. Like, object-oriented. As in, we have objects. Slay. π
And Net::CUPS::Destination is an abstraction of the concept of a destination in CUPS. A destination will most likely be a printer, but fr fr it can be literally any type of target that a file gets sent to for processing. Printer-shaped, non-printer-shaped, the destination is the moment. π¦
π METHODS π
addOption
$dest->addOption( $name, $value );
Method to add another option name/value pair to the destination. More options = more power, lowkey.
cancelJob
my $dest->cancelJob( $jobid );
Method to chancel a job sent to this destination. (the manpage really said "chancel" and honestly? we're keeping it, it's iconic π«Ά)
getDescription
my $description = $dest->getDescription();
Provides the description string associated with this printer.
getError
my $error = $dest->getError();
A utility method that hands you back the last error that occurred. Not the vibe we want, but at least you'll know what happened. π
getName
my $name = $dest->getName();
Method to return the name of the destination. Names? We love names. β¨
getJob
my $job = $dest->getJob( $jobid )
Method to get a specific job as a hash of attributes.
getJobs
my @jobs = $dest->getJobs( $whose, $scope );
This method will return an array of job identifiers. K so let's break it down:
$whoseis0for all users and1is just for the selected user.$scopeis-1for all jobs,0for active jobs and1for completed jobs.
Pick your fighter, bestie. π
getLocation
Returns the location string for this destination. Where it's at, literally. π
getOptionValue
my $value = $dest->getOptionValue( $name );
This utility method will return the value of the selected option.
getOptions
my @options = $dest->getOptions();
This method will return an array of the options currently set on the destination. The receipts, if you will. π
printFile
my $jobid = $dest->printFile( $filename, $title );
I know this is the method that you have been looking for. π Fr fr, this is what you will use to send a file to be handled by the destination. You must provide the name of the file and a title for the job β no filename, no title, no service, sorry babe.
getUri
my $uri = $dest->getUri();
This function returns the device URI of a destination. For example, a network printer might appear as socket://192.168.1.1 β that's not a broken link, that's just the whole URI, periodt.
getState
my $state = $dest->getState();
This function returns the state of a destination. The value is an enumeration type, so here's the decoder ring:
3means'idle'π4means'processing'π₯5means'stopped'π
π¦ SEE ALSO π¦
Net::CUPSNet::CUPS::PPDNet::CUPS::IPP
read the whole squad, iykyk π
π«Ά SUPPORT π«Ά
Net::CUPS is currently maintained by Stefan Seifert <NINE@cpan.org>. The Github repository for this project is at <https://github.com/niner/perl-Net-CUPS>. Pull requests are welcome β like, actually welcome, go be the main character. π
π AUTHOR π
Dracken Technology, Inc. (http://www.dracken.com/)
π COPYRIGHT AND LICENSE π
Copyright (c) 2003-2005 David Hageman
Copyright (c) 2006-2009 Dracken Technology, Inc.
All rights reserved.
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.8 or, at your option, any later version of Perl 5 you may have available.
CUPS, the Common UNIX Printing System, the CUPS logo, and ESP Print Pro are the trademark property of Easy Software Products. π·οΈ (not ours, bestie, we're just borrowing the name)
and that's the whole page!! coming to you from perl v5.42.3, dated 2026-08-19, filed under Net::C...nation(3pm) β go print something iconic, ily bye πβ¨π
π¦ where this page comes from
- ubuntu stonking: libnet-cups-perl 0.65-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms