Perl Postscript Problem

Charles Curley charlescurley at charlescurley.com
Wed Aug 4 13:42:18 MDT 2010


On Wed, 4 Aug 2010 13:26:04 -0600
Levi Pearson <levipearson at gmail.com> wrote:

> On Wed, Aug 4, 2010 at 12:26 PM, Charles Curley
> <charlescurley at charlescurley.com> wrote:
> > I have been using PostScript::TextBlock to spit out envelope text
> > ready to print. No graphics, nothing fancy, and it has worked for
> > years. Now on Ubuntu 10.4 ("Good Buddy") I get:
> >
> > Can't use string ("1") as an ARRAY ref while "strict refs" in use
> > at /usr/share/perl5/PostScript/TextBlock.pm line 57.
> 
> Sorry, I don't have anything actually useful to add, but it seems
> crazy that perl would refuse to let you use an integer in a string as
> a number.  That always seemed like one of the defining features of
> perl--that it would do what you mean instead of forcing you to
> conform.

I agree. Googling turned up one web page that indicated that the
problem has to do with prototyping subroutines and the order in which
you put them in the file (!!).

> 
> That being said, maybe you could find some way to turn "strict refs"
> off?  Sounds like that would eliminate the issue and alleviate the
> need to find a new envelope printing solution.

I suppose I could, but who knows what other follies I would let out of
the box by doing so? The module was last updated in 1999, which makes
it ancient even by perl standards. So I'm looking for a substitute. I
think that's a more productive use of my time.

The substitute need not spit out postscript. It just has to be
displayable and printable. I'm looking at PDF::Create now, and think
that may do the job.

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB


More information about the PLUG mailing list