OK, I can see how that might have been confusing.
The module is Printer::Unix.
It's bundled with Printer, rather than being provided as a separately distributed module.
You can find it as follows:
-
At the top of the Printer page,
you'll see a link to the distribution page: Printer-0.98.
-
That page has a number of links.
Against the heading Special Files,
you'll see a link to MANIFEST.
-
On the MANIFEST page, you'll see links to all the items that make up the distribution;
lib/Printer/Unix.pm
links to the source code for Printer::Unix.
There's probably additional confusion because the
source code for Printer has
require Printer::Unix;
but the source code for Printer::Unix
has no package statement.
The module is Printer::Unix but its namespace is Printer.
The code I suggested should be added to your program as I originally stated:
nothing has changed in that respect.
As a general rule, you should not make changes to module code you've installed from CPAN.
If you have made any changes, you should reverse them: if in doubt, reinstall the module.
You should be able to create a SSCCE fairly easily.
Start with code similar to what I suggested; add use Printer;; then your sub printX {...};
then a call to exercise it (printX(@args)).
Important:
Note that I used printX.
You don't have to call it that; but do not call it print:
that's the name of a core function (print)
and could easily cause problems.
The Printer module only works with a limited number of platforms that I don't have available.
I'd be happy to look at your SSCCE code but I'm not in a position to run and test it.
You should also change your current indirect object syntax:
my $prn=new Printer('linux' => '6L',);
to
my $prn = Printer::->new(linux => '6L');
See Indirect Object Syntax for an explanation.
Note the emboldened text: "... use of this syntax is discouraged ...".
|