Perl Postscript Problem

Jon Jensen jon at
Wed Aug 4 13:49:13 MDT 2010

On Wed, 4 Aug 2010, Levi Pearson wrote:

>> Can't use string ("1") as an ARRAY ref while "strict refs" in use at 
>> /usr/share/perl5/PostScript/ 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.

It's not refusing to use a string as a number -- it's refusing to use a 
string as an array reference.

>From a quick look at the code, it seems something is wrongly overwriting 
the PostScript::TextBlock object you create with a "1", so that later uses 
that expect it to be an array fail. You'd need to debug and track down 
what wrongly overwrites the object to fix it. Given that it's a fairly 
simple module, it may not be that hard to find the problem.

There are many other PostScript-generation packages on CPAN, but I doubt 
any use the same API as this one.

One I've used is PostScript::BasicTypesetter.


Jon Jensen
End Point Corporation

More information about the PLUG mailing list