File: list_dests.pl

package info (click to toggle)
libnet-cups-perl 0.64-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 712 kB
  • sloc: perl: 4,171; pascal: 3,212; ansic: 64; makefile: 3
file content (25 lines) | stat: -rwxr-xr-x 339 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl

use strict;
use warnings;

##
##  This is an example of how to get all of the destinations on
##  the default server.
##

use Net::CUPS;
use Net::CUPS::Destination;

{
	my $cups = Net::CUPS->new();

	my @destinations = $cups->getDestinations();

	foreach( @destinations )
	{
		print $_->getName() ."\n";
	}

	exit( 0 );
}