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:

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 ...".

— Ken


In reply to Re^3: Taint error in Printer module by kcott
in thread Taint error in Printer module by ksublondie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.